This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

4.2/4.3 PATCH: Fix IRIX 6.5 <stdint.h> for non-C99 compilations (PR libgcj/28190)


The IRIX 6 <stdint.h> starts like this:

#ifndef __c99
#error This header file is to be used only for c99 mode compilations
#else

This causes lots of trouble compiling e.g. libjava as described in PR
libgcj/28190, therefore I've decided just fixinclude this file.  The
following patch does so.

Bootstrapped on mips-sgi-irix6.5 without regressions.  Ok for mainline and
4.2 branch?

	Rainer

-----------------------------------------------------------------------------
Rainer Orth, Faculty of Technology, Bielefeld University


Fri Jun 29 19:03:57 2007  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>

	PR libgcj/28190
	* inclhack.def (irix_stdint_c99): New fix.
	* fixincl.x: Regenerate.
	* tests/base/stdint.h: New test.

Index: fixincludes/tests/base/stdint.h
===================================================================
--- fixincludes/tests/base/stdint.h	(revision 0)
+++ fixincludes/tests/base/stdint.h	(revision 0)
@@ -0,0 +1,16 @@
+/*  DO NOT EDIT THIS FILE.
+
+    It has been auto-edited by fixincludes from:
+
+	"fixinc/tests/inc/stdint.h"
+
+    This had to be done to correct non-standard usages in the
+    original, manufacturer supplied header file.  */
+
+
+
+#if defined( IRIX_STDINT_C99_CHECK )
+#if 0
+#error This header file is to be used only for c99 mode compilations
+#else
+#endif  /* IRIX_STDINT_C99_CHECK */
Index: fixincludes/inclhack.def
===================================================================
--- fixincludes/inclhack.def	(revision 125953)
+++ fixincludes/inclhack.def	(working copy)
@@ -2211,6 +2211,24 @@ fix = {
 };
 
 /*
+ *  IRIX 6.5 <stdint.h> only works with ISO C99 and errors out
+ *  otherwise.
+ */
+fix = {
+    hackname  = irix_stdint_c99;
+    files     = stdint.h;
+    select = "(#ifndef __c99\n)(#error This header file is to be used only for c99 mode compilations)";
+
+    mach      = "mips-sgi-irix6.5";
+    c_fix  = format;
+    c_fix_arg = "#if 0\n"
+	        "%2";
+    test_text =
+    "#ifndef __c99\n#error This header file is to be used only for c99 mode compilations\n#else";
+};
+
+
+/*
  *  IRIX 5.x's stdio.h and IRIX 6.5's internal/stdio_core.h declare
  *  some functions that take a va_list as
  *  taking char *.  However, GCC uses void * for va_list, so


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]