libio.h cleanup (was Re: changes for approval, part three (solaris))
David Edelsohn
dje@watson.ibm.com
Wed Oct 25 13:42:00 GMT 2000
To be concrete, attached is the revised patch to define __THROW,
__P, and __PMT in libio.h without using sys/cdefs.h or _G_HAVE_SYS_CDEFS
dependency. The use of "throw ()" is guarded by __cplusplus.
David
Index: libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libio/libio.h,v
retrieving revision 1.9
diff -c -p -r1.9 libio.h
*** libio.h 2000/10/25 16:54:47 1.9
--- libio.h 2000/10/25 20:39:39
***************
*** 56,72 ****
#endif
#ifndef __P
! # if _G_HAVE_SYS_CDEFS
! # include <sys/cdefs.h>
# else
! # ifdef __STDC__
! # define __P(p) p
! # define __PMT(p) p
! # else
! # define __P(p) ()
! # define __PMT(p) ()
! # endif
# endif
#endif /*!__P*/
/* For backward compatibility */
--- 56,68 ----
#endif
#ifndef __P
! # ifdef __cplusplus
! # define __THROW throw ()
# else
! # define __THROW
# endif
+ # define __P(p) p __THROW
+ # define __PMT(p) p
#endif /*!__P*/
/* For backward compatibility */
More information about the Libstdc++
mailing list