doc/gnulib.texi (Header files): Add note about C++ problems.
[gnulib.git] / doc / gnulib.texi
index c5f8fd7..e98f124 100644 (file)
@@ -10,7 +10,8 @@
 @end ifclear
 @comment %**end of header
 
-@set UPDATED $Date: 2007-09-09 13:20:45 $
+@comment Defines the UPDATED variable.
+@include updated-stamp
 
 @copying
 This manual is for GNU Gnulib (updated @value{UPDATED}),
@@ -198,6 +199,11 @@ preference might depend on whether you consider the API exported by
 your header file as something available for C programs only, or for C
 and C++ programs alike.
 
+Note that putting a @code{#include} in an @code{extern "C" @{ ... @}}
+block yields a syntax error in C++ mode on some platforms.  For this
+reason, it is recommended to place the @code{#include} before the
+@code{extern "C"} block.
+
 @subheading Include ordering
 
 When writing a gnulib module, or even in general, a good way to order
@@ -325,21 +331,16 @@ 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}.
+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 to (partial) getaddrinfo
 implementation.
 
-If you want to support Windows 2000, don't do anything, but be aware
-that gnulib will use its own (partial) getaddrinfo implementation even
-on Windows XP.  Currently the code does not attempt to determine if
-the getaddrinfo function is available during runtime.
-
-Todo: Make getaddrinfo.c open the WS2_32.DLL and check for the
-getaddrinfo symbol and use it if present, otherwise fall back to our
-own 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.
 
 @node Libtool and Windows
 @section Libtool and Windows
@@ -2936,6 +2937,7 @@ not worked around by Gnulib.
 * pty.h::
 * resolv.h::
 * shadow.h::
+* sys/ioctl.h::
 * sysexits.h::
 * ttyent.h::
 @end menu
@@ -2968,6 +2970,7 @@ not worked around by Gnulib.
 @include glibc-headers/pty.texi
 @include glibc-headers/resolv.texi
 @include glibc-headers/shadow.texi
+@include glibc-headers/sys_ioctl.texi
 @include glibc-headers/sysexits.texi
 @include glibc-headers/ttyent.texi
 
@@ -5087,6 +5090,9 @@ This list of functions is sorted according to the header that declares them.
 @include glibc-functions/ioperm.texi
 @include glibc-functions/iopl.texi
 
+@c @node Glibc sys/ioctl.h
+@c @section Glibc @code{<sys/ioctl.h>}
+
 @c @node Glibc sys/ipc.h
 @c @section Glibc Extensions to @code{<sys/ipc.h>}