This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
PATCH: Protect "abort" prototype
- To: egcs-bugs at cygnus dot com
- Subject: PATCH: Protect "abort" prototype
- From: Manfred Hollstein <manfred at s-direktnet dot de>
- Date: Tue, 5 May 1998 08:40:52 +0200 (MET DST)
- Reply-To: manfred at s-direktnet dot de, Manfred dot Hollstein at ks dot sel dot alcatel dot de
Now that gcc's system.h defines a macro "abort" taking no arguments,
the probably generated prototype in the fixed stdlib.h file conflicts
with this macro. Although this happens only when compiling with
-D__USE_FIXED_PROTOTYPES__, which is not recommended, I think we should
fix it:
Tue May 5 08:26:33 1998 Manfred Hollstein <manfred@s-direktnet.de>
* fix-header.c (write_rbrac): Add "abort" to functions which need to
be protected.
diff -rup -x CVS -x RCS -x *.o -x *.info* -x *.html* -x *.elc -x *.dvi -x *.orig -x *~ -x version.el egcs-19980501.orig/gcc/fix-header.c egcs-19980501/gcc/fix-header.c
--- egcs-19980501.orig/gcc/fix-header.c Sun Apr 19 15:41:03 1998
+++ egcs-19980501/gcc/fix-header.c Sun Apr 19 15:41:03 1998
@@ -812,7 +812,8 @@ write_rbrac ()
|| !strcmp (fn->fname, "vprintf")
|| !strcmp (fn->fname, "vfprintf")
|| !strcmp (fn->fname, "vsprintf")
- || !strcmp (fn->fname, "rewinddir"))
+ || !strcmp (fn->fname, "rewinddir")
+ || !strcmp (fn->fname, "abort"))
macro_protect = 1;
if (macro_protect)