Subject: stdio.h broken for -traditional and FIX
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: None <Mark_Weaver@brown.edu>
List: current-users
Date: 12/11/1993 08:04:14
I noticed today that stdio.h won't compile with gcc -traditional.  The
cause is the use of GCC's __attribute__ extension to define the
special printf calls.  Here is the fix:

diff -c  sys/sys/cdefs.h.mhw1 sys/sys/cdefs.h
*** sys/sys/cdefs.h.mhw1	Sat Dec  4 05:36:48 1993
--- sys/sys/cdefs.h	Sat Dec 11 07:40:52 1993
***************
*** 66,71 ****
--- 66,72 ----
  #define	__P(protos)	()		/* traditional C preprocessor */
  #define	__CONCAT(x,y)	x/**/y
  #define	__STRING(x)	"x"
+ #define	__attribute__(attrs)		/* delete GCC's function attrs */
  
  #ifdef __GNUC__
  #define	const		__const		/* GCC: ANSI C with -traditional */
--------------------------------------------------------------------
Email: Mark_Weaver@brown.edu           | Brown University
PGP Key: finger mhw@cs.brown.edu       | Dept of Computer Science

------------------------------------------------------------------------------