[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] renameat: port to Solaris 10, which declares renameat in uni
From: |
Bruno Haible |
Subject: |
Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h |
Date: |
Wed, 27 Oct 2010 03:16:37 +0200 |
User-agent: |
KMail/1.9.9 |
Hi Eric,
> I concur with the idea of this patch
OK, committed.
> but wonder if we need to tighten
> up lib/unistd.in.h to only include <stdio.h> on Cygwin, so as to avoid
> difficult analysis of whether the circular inclusions between our
> replacement <stdio.h> and <unistd.h> would negatively affect Solaris 10.
Good point. Yes, too many #includes like this can lead to parse errors
in particular situations (even when all gnulib self-tests compile), and
it's a pain to analyze this kind of failure. I'm applying this:
2010-10-26 Bruno Haible <address@hidden>
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.
--- lib/unistd.in.h.orig Wed Oct 27 02:59:10 2010
+++ lib/unistd.in.h Wed Oct 27 02:57:11 2010
@@ -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
- [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Paul Eggert, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Eric Blake, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Paul Eggert, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Bruno Haible, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Eric Blake, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h,
Bruno Haible <=
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Eric Blake, 2010/10/27
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Eric Blake, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Paul Eggert, 2010/10/26
- Re: [PATCH] renameat: port to Solaris 10, which declares renameat in unistd.h, Bruno Haible, 2010/10/26