bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: problem with unistd.h on mingw systems


From: Paul Eggert
Subject: Re: problem with unistd.h on mingw systems
Date: Wed, 16 Jan 2013 15:49:50 -0800
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/17.0 Thunderbird/17.0

Thanks, I pushed this:

---
 ChangeLog       |  5 +++++
 lib/unistd.in.h | 20 ++------------------
 2 files changed, 7 insertions(+), 18 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c692ff0..8218eb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2013-01-16  Paul Eggert  <address@hidden>
 
+       unistd: port to recent mingw
+       * lib/unistd.in.h: Remove special invocation convention for mingw,
+       which breaks for the latest mingw version.  See John W. Eaton in
+       <http://lists.gnu.org/archive/html/bug-gnulib/2013-01/msg00100.html>.
+
        largefile: port better to Mac OS X 10.5
        This patch is backported from Autoconf git.
        * m4/largefile.m4 (AC_SYS_LARGEFILE): Use AC_DEFINE, not
diff --git a/lib/unistd.in.h b/lib/unistd.in.h
index 373bf91..7cc022d 100644
--- a/lib/unistd.in.h
+++ b/lib/unistd.in.h
@@ -14,29 +14,13 @@
    You should have received a copy of the GNU General Public License
    along with this program; if not, see <http://www.gnu.org/licenses/>.  */
 
+#ifndef address@hidden@_UNISTD_H
+
 #if __GNUC__ >= 3
 @PRAGMA_SYSTEM_HEADER@
 #endif
 @PRAGMA_COLUMNS@
 
-/* Special invocation convention:
-   - 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 @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@
-#  @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-# else
-#  error unexpected; report this to address@hidden
-# endif
-# define _GL_WINSOCK2_H_WITNESS
-
-/* Normal invocation.  */
-#elif !defined address@hidden@_UNISTD_H
-
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
-- 
1.7.11.7




reply via email to

[Prev in Thread] Current Thread [Next in Thread]