diff options
author | Earnie Boyd <earnie@users.sf.net> | 2001-04-12 01:11:41 +0000 |
---|---|---|
committer | Earnie Boyd <earnie@users.sf.net> | 2001-04-12 01:11:41 +0000 |
commit | eae0943a1f63ae4bc689fec3e6634d8020e4aff0 (patch) | |
tree | 40f55870042217cb4826b8dda34aabf4711a541e | |
parent | e1cc9ad77ccc7d11b0201f548c4f3a79e70f4bb3 (diff) | |
download | newlib-eae0943a1f63ae4bc689fec3e6634d8020e4aff0.zip newlib-eae0943a1f63ae4bc689fec3e6634d8020e4aff0.tar.gz newlib-eae0943a1f63ae4bc689fec3e6634d8020e4aff0.tar.bz2 |
* include/windows.h (#include <winsock.h>): Include <winsock2.h>
instead if (_WIN32_WINNT >= 0x0400)&&(__W32API_MAJOR_VERSION > 0).
-rw-r--r-- | winsup/w32api/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/w32api/include/windows.h | 9 |
2 files changed, 14 insertions, 0 deletions
diff --git a/winsup/w32api/ChangeLog b/winsup/w32api/ChangeLog index d08ea00..21f91bf 100644 --- a/winsup/w32api/ChangeLog +++ b/winsup/w32api/ChangeLog @@ -1,4 +1,9 @@ +2001-04-11 Danny Smith <dannysmith@users.sourceforge.net> + + * include/windows.h (#include <winsock.h>): Include <winsock2.h> + instead if (_WIN32_WINNT >= 0x0400)&&(__W32API_MAJOR_VERSION > 0). + 2001-04-11 Danny Smith <danny_r_smith_2001@yahoo.co.nz> * include/winuser.h (WM_IME_*): Remove defines (now in imm.h). diff --git a/winsup/w32api/include/windows.h b/winsup/w32api/include/windows.h index 6259839..59fc634 100644 --- a/winsup/w32api/include/windows.h +++ b/winsup/w32api/include/windows.h @@ -141,7 +141,16 @@ #endif #endif #if defined(__USE_W32_SOCKETS) || !(defined(__INSIDE_CYGWIN__) || defined(__CYGWIN__) || defined(__CYGWIN32__) || defined(_UWIN)) +#if (_WIN32_WINNT >= 0x0400) && (__W32API_MAJOR_VERSION > 0) +#include <winsock2.h> +/* + * MS likes to include mswsock.h here as well, + * but that can cause undefined symbols if + * winsock2.h is included before windows.h + */ +#else #include <winsock.h> +#endif /* (_WIN32_WINNT >= 0x0400) && (__W32API_MAJOR_VERSION > 0) */ #endif #endif /* WIN32_LEAN_AND_MEAN */ |