This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: libio.h cleanup (was Re: changes for approval, part three (solaris))
- To: libstdc++ at sources dot redhat dot com
- Subject: Re: libio.h cleanup (was Re: changes for approval, part three (solaris))
- From: David Edelsohn <dje at watson dot ibm dot com>
- Date: Wed, 25 Oct 2000 16:42:27 -0400
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 */