diff options
author | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-27 16:22:50 +0000 |
---|---|---|
committer | neroden <neroden@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-08-27 16:22:50 +0000 |
commit | adbefdd5cff2690d2d69fd22286ec376d856aea5 (patch) | |
tree | 3bf73b3a9f75df2712f0da1ee60311369ea704cb /gcc/fixinc | |
parent | 60f30e1335bdbc4e3409b6bd0481aa21cdd55c49 (diff) | |
download | gcc-adbefdd5cff2690d2d69fd22286ec376d856aea5.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@70848 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/fixincl.x | 14 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 34 |
2 files changed, 38 insertions, 10 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index c8ac74a7920..e730e47011f 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * 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 * 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. * @@ -5664,11 +5664,11 @@ static tTestDesc aUndefine_NullTests[] = { */ static const char* apzUndefine_NullPatch[] = { "format", - "#ifndef NULL%2\n\ -#define NULL%1%2\n\ -#endif%2\n", - "^#[ \t]*define[ \t]*[ \t]NULL([^\r\n\ -]+)([\r]*)\n", + "#ifndef NULL\n\ +#define NULL%1\n\ +#endif\n", + "^#[ \t]*define[ \t]+NULL([^\r\n\ +]+)[\r]*\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index a5ec61ff7ac..a9472aeb578 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -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 * 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 @@ -3442,6 +3467,8 @@ fix = { /* * Fix multiple defines for NULL. Sometimes, we stumble into \r\n * 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 = { hackname = undefine_null; @@ -3449,10 +3476,11 @@ fix = { bypass = "#[ \t]*(ifn|un)def[ \t]+NULL($|[ \t\r])"; c_fix = format; - c_fix_arg = "#ifndef NULL%2\n#define NULL%1%2\n#endif%2\n"; - c_fix_arg = "^#[ \t]*define[ \t]*[ \t]NULL([^\r\n]+)([\r]*)\n"; + c_fix_arg = "#ifndef NULL\n#define NULL%1\n#endif\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"; }; /* |