]> Savannah Git Hosting - gnulib.git/commitdiff
unistd: port readlink to Mac OS X 10.3.9
authorPaul Eggert <eggert@penguin.cs.ucla.edu>
Tue, 25 Feb 2014 19:16:27 +0000 (11:16 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 25 Feb 2014 19:16:47 +0000 (11:16 -0800)
* lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
around self-include problem in Mac OS X 10.3.9 when combined with
readlink module.  Problem reported by Klaus Zietler in
<http://bugs.gnu.org/16825>.

ChangeLog
lib/unistd.in.h

index fcb9afcc1f4bdb161e2343eb83eb5e34cdf0b12a..2b6393f7a6913aa60223a4eca6cb9fdec1009ac0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-02-25  Paul Eggert  <eggert@penguin.cs.ucla.edu>
+
+       unistd: port readlink to Mac OS X 10.3.9
+       * lib/unistd.in.h (_GL_INCLUDING_UNISTD_H): New macro, to work
+       around self-include problem in Mac OS X 10.3.9 when combined with
+       readlink module.  Problem reported by Klaus Zietler in
+       <http://bugs.gnu.org/16825>.
+
 2014-02-23  Paul Eggert  <eggert@cs.ucla.edu>
 
        diffseq: remove TOO_EXPENSIVE heuristic
index 8d9e73e61a6637121d13e28518781037e0fcad44..58ca1846470af16b85354490ab8b5ed9b7d5b562 100644 (file)
 #endif
 @PRAGMA_COLUMNS@
 
+#ifdef _GL_INCLUDING_UNISTD_H
+/* Special invocation convention:
+   - On Mac OS X 10.3.9 we have a sequence of nested includes
+     <unistd.h> -> <signal.h> -> <pthread.h> -> <unistd.h>
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.  */
+
+#@INCLUDE_NEXT@ @NEXT_UNISTD_H@
+
+#else
+/* Normal invocation convention.  */
+
 /* The include_next requires a split double-inclusion guard.  */
 #if @HAVE_UNISTD_H@
+# define _GL_INCLUDING_UNISTD_H
 # @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+# undef _GL_INCLUDING_UNISTD_H
 #endif
 
 /* Get all possible declarations of gethostname().  */
@@ -1539,4 +1553,5 @@ _GL_CXXALIASWARN (write);
 _GL_INLINE_HEADER_END
 
 #endif /* _@GUARD_PREFIX@_UNISTD_H */
+#endif /* _GL_INCLUDING_UNISTD_H */
 #endif /* _@GUARD_PREFIX@_UNISTD_H */