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]

Solaris 10 fixinc patch


This patch bypasses some unnecessary fixincludes fixes on Solaris 10.
(For those bypassed by target name, in the long term it would be best
to eliminate fixes that just make sure the GCC definition of certain
types is used in favour of using the fact that duplicate typedefs are
allowed in system headers if consistent and GCC's definition ought to
be consistent with that in the system headers, so system headers then
need fixing in this regard only if internally inconsistent.  But at
the present stage, simply bypassing unnecessary fixes is safer, and
avoiding unnecessary fixes is useful for all users who might want to
use a compiler built on one operating system version with a later
operating system version.)

Bootstrapped with no regressions on i386-pc-solaris2.10.  OK to
commit?

2004-11-25  Mark Mitchell  <mark@codesourcery.com>

	* inclhack.def (gnu_types): Do not use on Solaris 2.1x.
	(stdio_va_list): Likewise.
	(stdio_stdarg.h): Likewise.
	(solaris_stdio_tag): Add bypass.
	* fixincl.x: Regenerated.

diff -rupN -x CVS gcc-merge-HEAD-csl-sol210-1/fixincludes/inclhack.def gcc-sol210/fixincludes/inclhack.def
--- gcc-merge-HEAD-csl-sol210-1/fixincludes/inclhack.def	2004-09-17 15:58:40.000000000 -0700
+++ gcc-sol210/fixincludes/inclhack.def	2004-10-12 23:29:02.000000000 -0700
@@ -1116,6 +1116,9 @@ fix = {
     bypass    = '_GCC_(PTRDIFF|SIZE|WCHAR)_T';
     select    = "^[ \t]*typedef[ \t]+.*[ \t](ptrdiff|size|wchar)_t;";
     c_fix     = gnu_type;
+    /* The Solaris 2.10 headers already define these types correctly.  */
+    mach   = '*-*-solaris2.1[0-9]*';
+    not_machine = true;
 
     test_text = "typedef long int ptrdiff_t; /* long int */\n"
                 "typedef uint_t size_t; /* uint_t */\n"
@@ -2600,6 +2582,9 @@ fix = {
     files    = stdio_tag.h;
 
     select   = '__cplusplus < 54321L';
+    /* In Solaris 2.10, the code in stdio_tag.h is conditionalized on 
+       "!defined(__GNUC__)" so we no longer need to fix it.  */
+    bypass   = '__GNUC__';
     sed      = 's/defined(__cplusplus) && (__cplusplus < 54321L)/0/';
 
     test_text = "#if\tdefined(__cplusplus) && (__cplusplus < 54321L)";
@@ -2665,6 +2650,12 @@ fix = {
     hackname = stdio_stdarg_h;
     files    = stdio.h;
     bypass   = "include.*(stdarg\.h|machine/ansi\.h)";
+    /*
+     * On Solaris 2.10, this fix is unncessary; <stdio.h> includes
+     * <iso/stdio_iso.h>, which includes <sys/va_list.h>.
+      */
+    mach     = '*-*-solaris2.1[0-9]';
+    not_machine = true;
 
     c_fix     = wrap;
 
@@ -2699,6 +2690,13 @@ fix = {
     files    = wchar.h;
     files    = curses_colr/curses.h;
     bypass   = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
+    /* 
+     * On Solaris 2.10, the definition in 
+     * <stdio.h> is guarded appropriately by the _XPG4 feature macro; 
+     * there is therefore no need for this fix there.
+     */
+    mach = '*-*-solaris2.1[0-9]';
+    not_machine = true;
 
     /*
      * Use __gnuc_va_list in arg types in place of va_list.

-- 
Joseph S. Myers               http://www.srcf.ucam.org/~jsm28/gcc/
    jsm@polyomino.org.uk (personal mail)
    joseph@codesourcery.com (CodeSourcery mail)
    jsm28@gcc.gnu.org (Bugzilla assignments and CCs)


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