+2010-03-22 Eric Blake <eblake@redhat.com>
+
+ gethostname: further tweaks
+ * lib/unistd.in.h (includes): Only worry about <winsock2.h> if we
+ are overriding gethostname.
+ Suggested by Bruno Haible.
+
2010-03-21 Bruno Haible <bruno@clisp.org>
Fix comments.
- On mingw, several headers, including <winsock2.h>, include <unistd.h>,
but we need to ensure that both the system <unistd.h> and <winsock2.h>
are completely included before we replace gethostname. */
-#if @UNISTD_H_HAVE_WINSOCK2_H@ && !defined _GL_WINSOCK2_H_WITNESS \
- && defined _WINSOCK2_H
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+ && !defined _GL_WINSOCK2_H_WITNESS && defined _WINSOCK2_H
/* <unistd.h> is being indirectly included for the first time from
<winsock2.h>; avoid declaring any overrides. */
# if @HAVE_UNISTD_H@
#endif
/* Get all possible declarations of gethostname(). */
-#if @UNISTD_H_HAVE_WINSOCK2_H@ && !defined _GL_INCLUDING_WINSOCK2_H
+#if @GNULIB_GETHOSTNAME@ && @UNISTD_H_HAVE_WINSOCK2_H@ \
+ && !defined _GL_INCLUDING_WINSOCK2_H
# define _GL_INCLUDING_WINSOCK2_H
# include <winsock2.h>
# undef _GL_INCLUDING_WINSOCK2_H