+2010-10-26 Bruno Haible <bruno@clisp.org>
+
+ unistd: Refine workaround from 2009-12-23 against Cygwin bug.
+ * lib/unistd.in.h: Don't include <stdio.h> and <fcntl.h>, except on
+ Cygwin and mingw.
+ Suggested by Eric Blake.
+
2010-10-26 Bruno Haible <bruno@clisp.org>
stdio: Work around compilation error due to renameat() on Solaris 10.
/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
/* 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 <stdio.h>
#endif
/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
/* 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 <fcntl.h>
#endif