This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: WIN-24: natPlainDatagramSocket.cc


Adam Megacz wrote:

>
>2002-02-24  Adam Megacz  <adam@xwt.org>
>
>        * java/net/natPlainDatagramSocketImpl.cc: Updated #includes
>        for Win32, changed #ifdefs to check WIN32 instead of the
>        (now-obsolete) USE_WINSOCK, and removed support for socket
>        timeouts on Win32 pending further discussion.
>
>Index: natPlainDatagramSocketImpl.cc
>===================================================================
>RCS file: /cvs/gcc/gcc/libjava/java/net/natPlainDatagramSocketImpl.cc,v
>retrieving revision 1.31
>diff -u -r1.31 natPlainDatagramSocketImpl.cc
>--- natPlainDatagramSocketImpl.cc       2002/02/18 07:32:34     1.31
>+++ natPlainDatagramSocketImpl.cc       2002/02/24 23:39:44
>@@ -8,15 +8,16 @@
> 
> #include <config.h>
> 
>-#ifdef USE_WINSOCK
>+#ifdef WIN32
> #include <windows.h>
> #include <winsock.h>
> #include <errno.h>
> #include <string.h>
>+#undef STRICT
> #ifndef ENOPROTOOPT
> #define ENOPROTOOPT 109
> #endif
>-#else /* USE_WINSOCK */
>+#else /* WIN32 */
> #include "posix.h"
> #ifdef HAVE_SYS_SOCKET_H
> #include <sys/socket.h>
>@@ -29,7 +30,7 @@
> #endif
> #include <errno.h>
> #include <string.h>
>-#endif /* USE_WINSOCK */
>+#endif /* WIN32 */
>

Shouldn't this just #include "platform.h" unconditionally (and remove 
posix.h). That way you wouldnt need to #undef STRICT explicitly etc. 
Other than that, it looks OK.

Bryce.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]