This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fixincl.c - Several changes
- To: dje at watson dot ibm dot com, egcs-bugs at egcs dot cygnus dot com, egcs-patches at egcs dot cygnus dot com
- Subject: fixincl.c - Several changes
- From: korbb at egcs dot cygnus dot com
- Date: 10 May 1999 15:13:29 -0000
- Cc: ddsinc09 at ix dot netcom dot com
Reply-To: ddsinc09@ix.netcom.com
David> fix-header is redefining EXIT_FAILURE and EXIT_SUCCESS in
David> stdlib.h on AIX. I think this may be due to fix-header
David> parsing the file without seeing other header files which
David> enable and disable sections of stdlib.h so fix-header never
David> "sees" the existing definitions. How does one prevent
David> fix-header from being too aggressive in its fixes?
David>
David> Thanks, David
Some people may object to my indentation style,
but something along these lines ought to work
fix-headers.c(write_rbrac):
< if (!seen_EXIT_FAILURE)
< fprintf (outf, "#define EXIT_FAILURE 1\n");
< if (!seen_EXIT_SUCCESS)
< fprintf (outf, "#define EXIT_SUCCESS 0\n");
---
> if (!seen_EXIT_FAILURE)
> fprintf (outf, "#ifndef EXIT_FAILURE\n"
> "#define EXIT_FAILURE 1\n"
> "#endif\n");
> if (!seen_EXIT_SUCCESS)
> fprintf (outf, "#ifndef EXIT_SUCCESS\n"
> "#define EXIT_SUCCESS 0\n"
> "#endif\n");