From c0dad072d748b5a2313824461240f606f72c942c Mon Sep 17 00:00:00 2001 From: korbb Date: Fri, 12 Mar 2010 04:00:32 +0000 Subject: [PATCH] undo some of the damage git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@157399 138bc75d-0d04-0410-961f-82ee72b054a4 --- fixincludes/fixincl.x | 69 ++--------------------------------- fixincludes/inclhack.def | 94 ++++++++++++++---------------------------------- 2 files changed, 28 insertions(+), 135 deletions(-) diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 572637e8454..b1d095fbba2 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,19 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * -<<<<<<< .mine - * It has been AutoGen-ed September 5, 2009 at 01:31:09 PM by AutoGen 5.9.9 -======= - * It has been AutoGen-ed Friday January 29, 2010 at 04:49:43 PM MET ->>>>>>> .r157397 + * It has been AutoGen-ed March 11, 2010 at 07:56:32 PM by AutoGen 5.10.1 * From the definitions inclhack.def * and the template file fixincl */ -<<<<<<< .mine -/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Sep 5 13:31:09 PDT 2009 -======= -/* DO NOT SVN-MERGE THIS FILE, EITHER Fri Jan 29 16:49:43 MET 2010 ->>>>>>> .r157397 +/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Mar 11 19:56:32 PST 2010 * * You must regenerate it. Use the ./genfixes script. * @@ -6122,63 +6114,6 @@ static const char* apzRs6000_ParamPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * -<<<<<<< .mine - * Description of Sco_Math fix - */ -tSCC zSco_MathName[] = - "sco_math"; - -/* - * File name selection pattern - */ -tSCC zSco_MathList[] = - "math.h\0*/math.h\0"; -/* - * Machine/OS name selection pattern - */ -#define apzSco_MathMachs (const char**)NULL - -/* - * content selection pattern - do fix if pattern found - */ -tSCC zSco_MathSelect0[] = - "inline double abs"; - -/* - * content bypass pattern - skip fix if pattern found - */ -tSCC zSco_MathBypass0[] = - "__GNUG__"; - -#define SCO_MATH_TEST_CT 2 -static tTestDesc aSco_MathTests[] = { - { TT_NEGREP, zSco_MathBypass0, (regex_t*)NULL }, - { TT_EGREP, zSco_MathSelect0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Sco_Math - */ -static const char* apzSco_MathPatch[] = { sed_cmd_z, - "-e", "/#define.*__fp_class(a) \\\\/i\\\n\ -#ifndef __GNUC__\n", - "-e", "/.*__builtin_generic/a\\\n\ -#else\\\n\ -#define __fp_class(a) \\\\\\\n\ -\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n\ -\\ __fpclassifyl(a), \\\\\\\n\ -\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n\ -\\ __fpclassifyf(a),__fpclassify(a)))\\\n\ -#endif\n", - "-e", "/extern \"C++\"/N;/inline double abs/i\\\n\ -#ifndef __GNUC__\n", - "-e", "/inline long double trunc/N;/inline long double trunc.*}.*extern \"C++\"/a\\\n\ -#endif /* ! __GNUC__ */\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * -======= ->>>>>>> .r157397 * Description of Solaris_Complex fix */ tSCC zSolaris_ComplexName[] = diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index fa6211bcf11..88d2eebe2a0 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -607,7 +607,7 @@ fix = { fix = { hackname = alpha_assert; files = "assert.h"; - select = "(#[ \t]*" 'define assert\(EX\).*)\(\(int\) \(EX\)\)'; + select = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)'; c_fix = format; c_fix_arg = "%1(EX)"; test_text = '#define assert(EX) (((int) (EX)) ? (void)0 ' @@ -794,6 +794,27 @@ fix = { /* + * Change external names of wcstok/wcsftime via asm instead of macros on + * Tru64 UNIX V4.0. + */ +fix = { + hackname = alpha_wchar; + files = wchar.h; + + mach = "alpha*-dec-osf4*"; + select = "#define wcstok wcstok_r"; + sed = "s@#define wcstok wcstok_r@" + "extern wchar_t *wcstok __((wchar_t *, const wchar_t *, " + "wchar_t **)) __asm__(\"wcstok_r\");@"; + sed = "s@#define wcsftime __wcsftime_isoc@" + "extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *" + ", const struct tm *)) __asm__(\"__wcsftime_isoc\");@"; + test_text = "#define wcstok wcstok_r\n" + "#define wcsftime __wcsftime_isoc"; +}; + + +/* * For C++, avoid any typedef or macro definition of bool, * and use the built in type instead. * HP/UX 10.20 also has it in curses_colr/curses.h. @@ -1577,28 +1598,6 @@ fix = { }; -/* Some versions of glibc have a version of bits/string2.h that - produces "value computed is not used" warnings from strncpy; fix - this definition by using __builtin_strncpy instead as in newer - versions. */ -fix = { - hackname = glibc_strncpy; - files = bits/string2.h; - bypass = "__builtin_strncpy"; - c_fix = format; - c_fix_arg = "# define strncpy(dest, src, n) __builtin_strncpy (dest, src, n)"; - c_fix_arg = "# define strncpy([^\n]*\\\\\n)*[^\n]*"; - test_text = <<-EOT - # define strncpy(dest, src, n) \ - (__extension__ (__builtin_constant_p (src) && __builtin_constant_p (n) \\ - ? (strlen (src) + 1 >= ((size_t) (n)) \\ - ? (char *) memcpy (dest, src, n) \\ - : strncpy (dest, src, n)) \\ - : strncpy (dest, src, n))) - EOT; - -}; - /* glibc's tgmath.h relies on an expression that is not an integer constant expression being treated as it was by GCC 4.4 and earlier. */ @@ -3249,45 +3248,6 @@ fix = { /* -<<<<<<< .mine - * On OpenServer and on UnixWare 7, uses the native compiler - * __builtin_generic. We fix that usage to use the GCC equivalent. - * It also has a plethora of inline functions that conflict with libstdc++. - */ -fix = { - hackname = sco_math; - files = math.h, '*/math.h'; - select = "inline double abs"; - bypass = "__GNUG__"; - sed = "/#define.*__fp_class(a) \\\\/i\\\n" - "#ifndef __GNUC__\n"; - sed = -"/.*__builtin_generic/a\\\n" -"#else\\\n" -"#define __fp_class(a) \\\\\\\n" -"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a),long double),\\\\\\\n" -"\\ __fpclassifyl(a), \\\\\\\n" -"\\ __builtin_choose_expr(__builtin_types_compatible_p(typeof(a), float), \\\\\\\n" -"\\ __fpclassifyf(a),__fpclassify(a)))\\\n" -"#endif\n"; - - sed = "/extern \"C++\"/N;" - "/inline double abs/i\\\n" - "#ifndef __GNUC__\n"; - sed = "/inline long double trunc/N;" - "/inline long double trunc.*}.*extern \"C++\"/a\\\n" - "#endif /* ! __GNUC__ */\n"; - - test_text = - "#define __fp_class(a) \\\\\n" - " __builtin_generic(a,\"ld:__fplcassifyl;f:__fpclassifyf;:__fpclassify\")\n"; - -}; - - -/* -======= ->>>>>>> .r157397 * Solaris 10+ complex.h defines _Complex_I and _Imaginary_I in terms of * themselves, which are Sun Studio compiler intrinsics. Remove _Imaginary_I * and imaginary definitions which are not supported by GCC. @@ -3379,7 +3339,7 @@ fix = { fix = { hackname = solaris_math_8; - select = '@\(#\)math_c99\.h' "[ \t]+1\\.[0-9]+[ \t]+[0-9/]+ SMI"; + select = '@\(#\)math_c99.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI"; bypass = "__GNUC__"; files = iso/math_c99.h; c_fix = format; @@ -3389,11 +3349,9 @@ fix = { "\t\t\t ? __builtin_signbitl(x) \\\n" "\t\t\t : __builtin_signbit(x))"; c_fix_arg = "^#define[ \t]+signbit\\(x\\)[ \t]+__builtin_signbit\\(x\\)"; - test_text = <<- _EOText_ - #ident "@(#)math_c99.h 1.9 04/11/01 SMI" - #undef signbit - #define signbit(x) __builtin_signbit(x) - _EOText_; + test_text = + '#ident "@(#)math_c99.h 1.9 04/11/01 SMI"'"\n" + "#define signbit(x) __builtin_signbit(x)"; }; fix = { -- 2.11.0