Commit 036e07f2 by Nathanael Nerode

inclhack.def (ptx_netswap): New disabled fix, ported from fixinc.ptx.

	* fixinc/inclhack.def (ptx_netswap): New disabled fix, ported from
	fixinc.ptx.
	* fixinc/inclhack.def (undefine_null):  Don't generate \r characters.
	Prettify a little.
	* fixinc/fixincl.x: Regenerate.

From-SVN: r70848
parent 4202ce82
2003-08-27 Nathanael Nerode <neroden@gcc.gnu.org>
* fixinc/inclhack.def (ptx_netswap): New disabled fix, ported from
fixinc.ptx.
* fixinc/inclhack.def (undefine_null): Don't generate \r characters.
Prettify a little.
* fixinc/fixincl.x: Regenerate.
2003-08-27 Richard Earnshaw <rearnsha@arm.com> 2003-08-27 Richard Earnshaw <rearnsha@arm.com>
* lib1funcs.asm (L_ieee754_sp): New. Include ieee754-sf.S. * lib1funcs.asm (L_ieee754_sp): New. Include ieee754-sf.S.
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * DO NOT EDIT THIS FILE (fixincl.x)
* *
* It has been AutoGen-ed Sunday August 24, 2003 at 03:26:44 PM EDT * It has been AutoGen-ed Wednesday August 27, 2003 at 12:21:31 PM EDT
* From the definitions inclhack.def * From the definitions inclhack.def
* and the template file fixincl * and the template file fixincl
*/ */
/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Aug 24 15:26:44 EDT 2003 /* DO NOT CVS-MERGE THIS FILE, EITHER Wed Aug 27 12:21:31 EDT 2003
* *
* You must regenerate it. Use the ./genfixes script. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -5664,11 +5664,11 @@ static tTestDesc aUndefine_NullTests[] = { ...@@ -5664,11 +5664,11 @@ static tTestDesc aUndefine_NullTests[] = {
*/ */
static const char* apzUndefine_NullPatch[] = { static const char* apzUndefine_NullPatch[] = {
"format", "format",
"#ifndef NULL%2\n\ "#ifndef NULL\n\
#define NULL%1%2\n\ #define NULL%1\n\
#endif%2\n", #endif\n",
"^#[ \t]*define[ \t]*[ \t]NULL([^\r\n\ "^#[ \t]*define[ \t]+NULL([^\r\n\
]+)([\r]*)\n", ]+)[\r]*\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
......
...@@ -2017,6 +2017,31 @@ fix = { ...@@ -2017,6 +2017,31 @@ fix = {
/* /*
* In netinet/in.h, the network byte swapping asm functions supported by the
* native cc compiler on PTX 1.x and 2.x are not supported by gcc. Instead,
* include <sys/byteorder.h>, written out by fixincludes, which has
* these same routines written in an asm format supported by gcc.
*/
#ifdef PTX
fix = {
hackname = ptx_netswap;
files = netinet/in.h;
sed = "/#define NETSWAP/a\\\n"
"\\\n"
"#if defined (__GNUC__) || defined (__GNUG__)\\\n"
"#include <sys/byteorder.h>\\\n"
"#else /* not __GNUC__ */\n";
sed = "/#endif[ \t]*\\/\\* NETSWAP \\*\\//i\\\n"
"#endif /* not __GNUC__ */\n";
/* Half-hearted test case: I have no idea what the file this is really
supposed to operate on looks like. */
test_text = "#define NETSWAP\n"
"#endif /* NETSWAP */";
};
#endif
/*
* In pwd.h, PTX 1.x needs stdio.h included since FILE * was added in a * In pwd.h, PTX 1.x needs stdio.h included since FILE * was added in a
* prototype later on in the file. (It's not clear that this is * prototype later on in the file. (It's not clear that this is
* still true, and even if it is, FILE * may be added after this fix runs by * still true, and even if it is, FILE * may be added after this fix runs by
...@@ -3442,6 +3467,8 @@ fix = { ...@@ -3442,6 +3467,8 @@ fix = {
/* /*
* Fix multiple defines for NULL. Sometimes, we stumble into \r\n * Fix multiple defines for NULL. Sometimes, we stumble into \r\n
* terminated lines, so accommodate these. Test both ways. * terminated lines, so accommodate these. Test both ways.
* Don't bother to reproduce the \r\n termination, as GCC has to
* recognize \n termination anyway.
*/ */
fix = { fix = {
hackname = undefine_null; hackname = undefine_null;
...@@ -3449,10 +3476,11 @@ fix = { ...@@ -3449,10 +3476,11 @@ fix = {
bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])"; bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])";
c_fix = format; c_fix = format;
c_fix_arg = "#ifndef NULL%2\n#define NULL%1%2\n#endif%2\n"; c_fix_arg = "#ifndef NULL\n#define NULL%1\n#endif\n";
c_fix_arg = "^#[ \t]*define[ \t]*[ \t]NULL([^\r\n]+)([\r]*)\n"; c_fix_arg = "^#[ \t]*define[ \t]+NULL([^\r\n]+)[\r]*\n";
test_text = "#define NULL 0UL\r\n#define NULL\t((void*)0)\n"; test_text = "#define NULL 0UL\r\n"
"#define NULL\t((void*)0)\n";
}; };
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment