aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNathanael Nerode <neroden@gcc.gnu.org>2003-08-27 16:22:50 +0000
committerNathanael Nerode <neroden@gcc.gnu.org>2003-08-27 16:22:50 +0000
commit036e07f263ab62b11fb6c34402b5a0a1e92c5eb9 (patch)
tree3bf73b3a9f75df2712f0da1ee60311369ea704cb
parent4202ce820181761ad2e25b025894bb9537b42f76 (diff)
downloadgcc-036e07f263ab62b11fb6c34402b5a0a1e92c5eb9.zip
gcc-036e07f263ab62b11fb6c34402b5a0a1e92c5eb9.tar.gz
gcc-036e07f263ab62b11fb6c34402b5a0a1e92c5eb9.tar.bz2
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
-rw-r--r--gcc/ChangeLog8
-rw-r--r--gcc/fixinc/fixincl.x14
-rw-r--r--gcc/fixinc/inclhack.def34
3 files changed, 46 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4d398dc..a37591d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,11 @@
+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>
* lib1funcs.asm (L_ieee754_sp): New. Include ieee754-sf.S.
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index c8ac74a..e730e47 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 a5ec61f..a9472ae 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";
};
/*