From 823b17cbbfa84926b356d1112d877f490483946a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Wed, 27 Oct 2010 02:59:47 +0200 Subject: [PATCH] unistd: Refine workaround from 2009-12-23 against Cygwin bug. * lib/unistd.in.h: Don't include and , except on Cygwin and mingw. Suggested by Eric Blake. --- ChangeLog | 7 +++++++ lib/unistd.in.h | 6 ++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index d02876da1..457ef20db 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2010-10-26 Bruno Haible + unistd: Refine workaround from 2009-12-23 against Cygwin bug. + * lib/unistd.in.h: Don't include and , except on + Cygwin and mingw. + Suggested by Eric Blake. + +2010-10-26 Bruno Haible + stdio: Work around compilation error due to renameat() on Solaris 10. * lib/stdio.in.h: Include on Solaris. * lib/renameat.c: Don't include here. diff --git a/lib/unistd.in.h b/lib/unistd.in.h index 2221b5d8a..ea74d6311 100644 --- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,14 +61,16 @@ /* Cygwin 1.7.1 declares symlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ #if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \ - || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \ + || ((@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK) \ + && defined __CYGWIN__)) \ && ! defined __GLIBC__ # include #endif /* Cygwin 1.7.1 declares unlinkat in , not in . */ /* But avoid namespace pollution on glibc systems. */ -#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__ +#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && defined __CYGWIN__ \ + && ! defined __GLIBC__ # include #endif -- 2.11.0