tradcpp

Jakub Jelinek jakub@redhat.com
Thu Dec 28 02:52:00 GMT 2000


Hi!

Do we still support using traditional preprocessor (as opposed to K&R C
compiler) for glibc headers?
gcc -traditional chokes on recursive macros, such as in stdio.h.
There are many such cases though, stdio.h is the most visible one though.

	* libio/stdio.h (stdin, stdout, stderr): Don't define as macros for
	-traditional.

--- libc/libio/stdio.h.jj	Thu Sep 14 09:09:40 2000
+++ libc/libio/stdio.h	Thu Dec 28 11:55:13 2000
@@ -126,10 +126,12 @@ typedef _G_fpos64_t fpos64_t;
 extern FILE *stdin;		/* Standard input stream.  */
 extern FILE *stdout;		/* Standard output stream.  */
 extern FILE *stderr;		/* Standard error output stream.  */
+#ifdef __STDC__
 /* C89/C99 say they're macros.  Make them happy.  */
 #define stdin stdin
 #define stdout stdout
 #define stderr stderr
+#endif
 
 /* Remove file FILENAME.  */
 extern int remove (__const char *__filename) __THROW;


	Jakub


More information about the Libc-hacker mailing list