Mercurial > hg > octave-lyh > gnulib-hg
changeset 13828:54a5acffcb53
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.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Wed, 27 Oct 2010 02:59:47 +0200 |
parents | 805b81dc0827 |
children | cc0108d43f4b |
files | ChangeLog lib/unistd.in.h |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +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.
--- a/lib/unistd.in.h +++ b/lib/unistd.in.h @@ -61,14 +61,16 @@ /* 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