Commit 05e9e0a5 by Bruce Korb

Sort the fixes by fix name

From-SVN: r63081
parent 62e1dfcf
......@@ -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";
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment