diff --git a/winsup/doc/ChangeLog b/winsup/doc/ChangeLog index cf44de2e8..a747f7490 100644 --- a/winsup/doc/ChangeLog +++ b/winsup/doc/ChangeLog @@ -1,3 +1,8 @@ +2006-05-30 Dave Korn + + * faq-api.xml (faq.api.winsock): Replace references to depracated + Win32_Winsock macro with __USE_W32_WINSOCK, and enlarge on details. + 2006-05-24 Christopher Faylor * configure.in: Update to newer autoconf. diff --git a/winsup/doc/faq-api.xml b/winsup/doc/faq-api.xml index 1a9c6c517..ad9ea72e8 100644 --- a/winsup/doc/faq-api.xml +++ b/winsup/doc/faq-api.xml @@ -277,12 +277,17 @@ netdb. It isn't a good idea to use it in your applications. I don't want Unix sockets, how do I use normal Win32 winsock? -(Please note: This section has not yet been updated for the latest net release.) - -To use the vanilla Win32 winsock, you just need to #define Win32_Winsock -and #include "windows.h" at the top of your source file(s). You'll also -want to add -lwsock32 to the compiler's command line so you link against -libwsock32.a. +To use the vanilla Win32 winsock, you just need to #define __USE_W32_WINSOCK +and #include "windows.h" (or "winsock2.h" at the top of your source file(s). You may +find it easier to add "-D__USE_W32_WINSOCK" to the CFLAGS settings in your makefile, +if you are using one, as this will then apply to all your source files. It is also +worth using "#define WIN32_LEAN_AND_MEAN" before you include the windows header file, +as this will prevent it from pulling in lots of header files for all sorts of unrelated +windows APIs when all you want is the Winsock definitions; again, this could be set +for the entire project in your CFLAGS. + +You'll also need to add -lwsock32 to the compiler's command line (or the makefile's +list of link libs) so that you link against libwsock32.a.