diff options
author | Bruce Korb <korbb@gcc.gnu.org> | 2003-02-19 02:06:11 +0000 |
---|---|---|
committer | Bruce Korb <korbb@gcc.gnu.org> | 2003-02-19 02:06:11 +0000 |
commit | 05e9e0a570f2a0d9f1d683b4cb543ba556d6a1a6 (patch) | |
tree | fac2e8629b4fb6a2b4b9f0f6301469dd3134ed1a /gcc/fixinc | |
parent | 62e1dfcf2f4ba9568194e08ebccdd1b1c1db78f3 (diff) | |
download | gcc-05e9e0a570f2a0d9f1d683b4cb543ba556d6a1a6.zip gcc-05e9e0a570f2a0d9f1d683b4cb543ba556d6a1a6.tar.gz gcc-05e9e0a570f2a0d9f1d683b4cb543ba556d6a1a6.tar.bz2 |
Sort the fixes by fix name
From-SVN: r63081
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/inclhack.def | 192 |
1 files changed, 96 insertions, 96 deletions
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 8ebfe1a..64a479a 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1002,6 +1002,69 @@ fix = { /* + * Fix hpux 10.X missing ctype declarations 1 + */ +fix = { + hackname = hpux10_ctype_declarations1; + files = ctype.h; + select = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)"; + bypass = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\("; + c_fix = format; + c_fix_arg = "#ifdef _PROTOTYPES\n" + "extern int __tolower(int);\n" + "extern int __toupper(int);\n" + "#else /* NOT _PROTOTYPES */\n" + "extern int __tolower();\n" + "extern int __toupper();\n" + "#endif /* _PROTOTYPES */\n\n" + "%0\n"; + + test_text = "# define _toupper(__c) __toupper(__c)\n"; +}; + + +/* + * Fix hpux 10.X missing ctype declarations 2 + */ +fix = { + hackname = hpux10_ctype_declarations2; + files = ctype.h; + select = "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)"; + bypass = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\("; + c_fix = format; + c_fix_arg = "%0\n\n" + "#ifdef _PROTOTYPES\n" + " extern int _isalnum(int);\n" + " extern int _isalpha(int);\n" + " extern int _iscntrl(int);\n" + " extern int _isdigit(int);\n" + " extern int _isgraph(int);\n" + " extern int _islower(int);\n" + " extern int _isprint(int);\n" + " extern int _ispunct(int);\n" + " extern int _isspace(int);\n" + " extern int _isupper(int);\n" + " extern int _isxdigit(int);\n" + "# else /* not _PROTOTYPES */\n" + " extern int _isalnum();\n" + " extern int _isalpha();\n" + " extern int _iscntrl();\n" + " extern int _isdigit();\n" + " extern int _isgraph();\n" + " extern int _islower();\n" + " extern int _isprint();\n" + " extern int _ispunct();\n" + " extern int _isspace();\n" + " extern int _isupper();\n" + " extern int _isxdigit();\n" + "#endif /* _PROTOTYPES */\n"; + + test_text = "# if defined(_SB_CTYPE_MACROS) && !defined(__lint)\n" + " extern unsigned int *__SB_masks;\n"; +}; + + +/* * Make sure hpux defines abs in header. */ fix = { @@ -1017,27 +1080,6 @@ fix = { /* - * HP-UX long_double - */ -fix = { - hackname = hpux_long_double; - files = stdlib.h; - select = "extern[ \t]long_double[ \t]strtold"; - bypass = "long_double_t"; - sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D"; - sed = "s/long_double/long double/g"; - - test_text = "# ifndef _LONG_DOUBLE\n" - "# define _LONG_DOUBLE\n" - " typedef struct {\n" - " unsigned int word1, word2, word3, word4;\n" - " } long_double;\n" - "# endif /* _LONG_DOUBLE */\n" - "extern long_double strtold(const char *, char **);\n"; -}; - - -/* * Keep HP-UX 11 from stomping on C++ math namespace * with defines for fabsf. */ @@ -1104,65 +1146,35 @@ fix = { /* - * Fix hpux 10.X missing ctype declarations 1 + * Fix hpux 11.00 broken vsnprintf declaration */ fix = { - hackname = hpux10_ctype_declarations1; - files = ctype.h; - select = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)"; - bypass = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\("; + hackname = hpux11_vsnprintf; + files = stdio.h; + select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, ' + 'const char \*,) __va__list\);'; c_fix = format; - c_fix_arg = "#ifdef _PROTOTYPES\n" - "extern int __tolower(int);\n" - "extern int __toupper(int);\n" - "#else /* NOT _PROTOTYPES */\n" - "extern int __tolower();\n" - "extern int __toupper();\n" - "#endif /* _PROTOTYPES */\n\n" - "%0\n"; + c_fix_arg = "%1 __va_list);"; - test_text = "# define _toupper(__c) __toupper(__c)\n"; + test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,' + ' __va__list);'; }; /* - * Fix hpux 10.X missing ctype declarations 2 + * get rid of bogus inline definitions in HP-UX 8.0 */ fix = { - hackname = hpux10_ctype_declarations2; - files = ctype.h; - select = "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)"; - bypass = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\("; - c_fix = format; - c_fix_arg = "%0\n\n" - "#ifdef _PROTOTYPES\n" - " extern int _isalnum(int);\n" - " extern int _isalpha(int);\n" - " extern int _iscntrl(int);\n" - " extern int _isdigit(int);\n" - " extern int _isgraph(int);\n" - " extern int _islower(int);\n" - " extern int _isprint(int);\n" - " extern int _ispunct(int);\n" - " extern int _isspace(int);\n" - " extern int _isupper(int);\n" - " extern int _isxdigit(int);\n" - "# else /* not _PROTOTYPES */\n" - " extern int _isalnum();\n" - " extern int _isalpha();\n" - " extern int _iscntrl();\n" - " extern int _isdigit();\n" - " extern int _isgraph();\n" - " extern int _islower();\n" - " extern int _isprint();\n" - " extern int _ispunct();\n" - " extern int _isspace();\n" - " extern int _isupper();\n" - " extern int _isxdigit();\n" - "#endif /* _PROTOTYPES */\n"; - - test_text = "# if defined(_SB_CTYPE_MACROS) && !defined(__lint)\n" - " extern unsigned int *__SB_masks;\n"; + hackname = hpux8_bogus_inlines; + files = math.h; + select = inline; + 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]*) {.*}@@"; + sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@"; + sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@"; + test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n" + "inline double sqr(double v) { return v**0.5; }"; }; @@ -1183,35 +1195,23 @@ fix = { /* - * Fix hpux 11.00 broken vsnprintf declaration + * HP-UX long_double */ fix = { - hackname = hpux11_vsnprintf; - files = stdio.h; - select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, ' - 'const char \*,) __va__list\);'; - c_fix = format; - c_fix_arg = "%1 __va_list);"; - - test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,' - ' __va__list);'; -}; - + hackname = hpux_long_double; + files = stdlib.h; + select = "extern[ \t]long_double[ \t]strtold"; + bypass = "long_double_t"; + sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D"; + sed = "s/long_double/long double/g"; -/* - * get rid of bogus inline definitions in HP-UX 8.0 - */ -fix = { - hackname = hpux8_bogus_inlines; - files = math.h; - select = inline; - 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]*) {.*}@@"; - sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@"; - sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@"; - test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n" - "inline double sqr(double v) { return v**0.5; }"; + test_text = "# ifndef _LONG_DOUBLE\n" + "# define _LONG_DOUBLE\n" + " typedef struct {\n" + " unsigned int word1, word2, word3, word4;\n" + " } long_double;\n" + "# endif /* _LONG_DOUBLE */\n" + "extern long_double strtold(const char *, char **);\n"; }; |