From 7bacd338464a463f3ba0c14effd86b71ce3672b4 Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Mon, 22 Mar 2010 14:01:55 -0600 Subject: [PATCH] gethostname: further tweaks * lib/unistd.in.h (includes): Only worry about if we are overriding gethostname. Suggested by Bruno Haible. Signed-off-by: Eric Blake --- ChangeLog | 7 +++++++ lib/unistd.in.h | 7 ++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 28a1f4610..8e31e9a48 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-03-22 Eric Blake + + gethostname: further tweaks + * lib/unistd.in.h (includes): Only worry about if we + are overriding gethostname. + Suggested by Bruno Haible. + 2010-03-21 Bruno Haible Fix comments. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index beef6b05c..a60d4835d 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -19,8 +19,8 @@ - On mingw, several headers, including , include , but we need to ensure that both the system and 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 /* is being indirectly included for the first time from ; avoid declaring any overrides. */ # if @HAVE_UNISTD_H@ @@ -43,7 +43,8 @@ #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 # undef _GL_INCLUDING_WINSOCK2_H -- 2.11.0