stdio: Fix problem with popen() declaration on OSF/1 5.1.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Dec 2010 23:32:29 +0000 (00:32 +0100)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Dec 2010 23:32:29 +0000 (00:32 +0100)
* lib/stdio.in.h: During the include_next statement, let recursive
includes of this file include only the system header file.

ChangeLog
lib/stdio.in.h

index 866f5953dd4e2db13e37fe1f8444afe80cdc15ae..62a20ce952abd0dd34d36dbac2cf2777fda05bbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-12-19  Bruno Haible  <bruno@clisp.org>
+
+       stdio: Fix problem with popen() declaration on OSF/1 5.1.
+       * lib/stdio.in.h: During the include_next statement, let recursive
+       includes of this file include only the system header file.
+
 2010-12-19  Bruno Haible  <bruno@clisp.org>
 
        iconv_open: Fix regression from 2010-12-04.
index 6c41d441090a8b9a40aef3d04606c12bd9222bef..2b84cfe96e87114a012c7ec7666b82d551ceccf9 100644 (file)
 #endif
 @PRAGMA_COLUMNS@
 
-#if defined __need_FILE || defined __need___FILE
-/* Special invocation convention inside glibc header files.  */
+#if defined __need_FILE || defined __need___FILE || defined _GL_ALREADY_INCLUDING_STDIO_H
+/* Special invocation convention:
+   - Inside glibc header files.
+   - On OSF/1 5.1 we have a sequence of nested includes
+     <stdio.h> -> <getopt.h> -> <ctype.h> -> <sys/localedef.h> ->
+     <sys/lc_core.h> -> <nl_types.h> -> <mesg.h> -> <stdio.h>.
+     In this situation, the functions are not yet declared, therefore we cannot
+     provide the C++ aliases.  */
 
 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
 
 
 #ifndef _GL_STDIO_H
 
+#define _GL_ALREADY_INCLUDING_STDIO_H
+
 /* The include_next requires a split double-inclusion guard.  */
 #@INCLUDE_NEXT@ @NEXT_STDIO_H@
 
+#undef _GL_ALREADY_INCLUDING_STDIO_H
+
 #ifndef _GL_STDIO_H
 #define _GL_STDIO_H