This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: WIN-24: natPlainDatagramSocket.cc
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- To: Adam Megacz <patches at lists dot megacz dot com>
- Cc: java-patches at gcc dot gnu dot org
- Date: Mon, 25 Feb 2002 16:31:40 +1300
- Subject: Re: WIN-24: natPlainDatagramSocket.cc
- References: <86pu2u1mct.fsf@megacz.com>
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.