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]

fixinc patch to bypass unnecessary HP-UX header fixes


This patch bypasses some unnecessary fixes fixincludes makes on HP-UX:

hpux8_bogus_inlines fixes some definitions which now (HP-UX 11) are
conditioned with

#if defined(__cplusplus) && (__cplusplus < 199707) && !defined(__GNUG__)

and so that fix isn't needed.

sun_auth_proto adjusts certain RPC files on various systems to be
suitable for C++; HP-UX already has C++ versions in those headers, but
also includes a version for K&R compilers, appropriately conditioned.

int_abort_free_and_exit, sun_malloc and sysv68_string fix various
pre-standard library function types; such a fix is only of use if a
program might accidentally encounter those types without wanting them
and in the HP-UX headers they are conditioned on _CLASSIC_ANSI_TYPES.

Bootstrapped with no regressions on hppa2.0w-hp-hpux11.11.  OK to
commit?

-- 
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)

2004-11-09  Joseph S. Myers  <joseph@codesourcery.com>

	* inclhack.def (hpux8_bogus_inlines): Bypass on __GNUG__.
	(int_abort_free_and_exit, sun_malloc, sysv68_string): Bypass on
	_CLASSIC_ANSI_TYPES.
	(sun_auth_proto): Bypass on __cplusplus.

diff -rupN fixincludes.orig/inclhack.def fixincludes/inclhack.def
--- fixincludes.orig/inclhack.def	2004-11-01 19:38:49.000000000 +0000
+++ fixincludes/inclhack.def	2004-11-09 15:34:22.000000000 +0000
@@ -1432,6 +1432,7 @@ fix = {
     hackname = hpux8_bogus_inlines;
     files    = math.h;
     select   = inline;
+    bypass   = "__GNUG__";
     sed = "s@inline int abs(int [a-z][a-z]*) {.*}"
            "@extern \"C\" int abs(int);@";
     sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
@@ -1521,6 +1522,7 @@ fix = {
     hackname  = int_abort_free_and_exit;
     files     = stdlib.h;
     select    = "int[ \t]+(abort|free|exit)[ \t]*\\(";
+    bypass    = "_CLASSIC_ANSI_TYPES";
 
     c_fix     = format;
     c_fix_arg = "void\t%1(";
@@ -2912,6 +2914,7 @@ fix = {
     files    = rpc/clnt.h;
     files    = rpc/svc.h;
     files    = rpc/xdr.h;
+    bypass   = "__cplusplus";
     /*
      *  Select those files containing '(*name)()'.
      */
@@ -2970,6 +2973,7 @@ fix = {
 fix = {
     hackname = sun_malloc;
     files    = malloc.h;
+    bypass   = "_CLASSIC_ANSI_TYPES";
 
     sed   = "s/typedef[ \t]char \\*\tmalloc_t/typedef void \\*\tmalloc_t/g";
     sed   = "s/int[ \t][ \t]*free/void\tfree/g";
@@ -3473,6 +3477,7 @@ fix = {
     hackname = sysv68_string;
     files    = testing.h;
     files    = string.h;
+    bypass   = "_CLASSIC_ANSI_TYPES";
 
     sed = "s/extern[ \t]*int[ \t]*strlen();/extern unsigned int strlen();/";
     sed = "s/extern[ \t]*int[ \t]*ffs[ \t]*(long);/extern int ffs(int);/";


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