diff options
Diffstat (limited to 'doc/windows-sockets.texi')
-rw-r--r-- | doc/windows-sockets.texi | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/doc/windows-sockets.texi b/doc/windows-sockets.texi new file mode 100644 index 0000000000..bdace46bd5 --- /dev/null +++ b/doc/windows-sockets.texi @@ -0,0 +1,27 @@ +@node Windows sockets +@section Windows sockets + +There are several issues when building applications that should work +under Windows. The most problematic part is for applications that use +sockets. + +Hopefully, we can add helpful notes to this section that will help you +port your application to Windows using gnulib. + +@subsection Getaddrinfo and WINVER + +This was written for the getaddrinfo module, but may be applicable to +other functions too. + +The getaddrinfo function exists in ws2tcpip.h and -lws2_32 on Windows +XP. The function declaration is present if @code{WINVER >= 0x0501}. +Windows 2000 does not have getaddrinfo in its @file{WS2_32.DLL}. + +Thus, if you want to assume Windows XP or later, you can add +AC_DEFINE(WINVER, 0x0501) to avoid compiling the (partial) getaddrinfo +implementation. + +If you want to support Windows 2000, don't do anything. The +replacement function will open @file{WS2_32.DLL} during run-time to +see if there is a getaddrinfo function available, and use it when +available. |