Skip to content
Snippets Groups Projects
Commit 05e9e0a5 authored by Bruce Korb's avatar Bruce Korb
Browse files

Sort the fixes by fix name

From-SVN: r63081
parent 62e1dfcf
No related branches found
No related tags found
No related merge requests found
...@@ -1001,6 +1001,69 @@ fix = { ...@@ -1001,6 +1001,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. * Make sure hpux defines abs in header.
*/ */
...@@ -1016,27 +1079,6 @@ fix = { ...@@ -1016,27 +1079,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 * Keep HP-UX 11 from stomping on C++ math namespace
* with defines for fabsf. * with defines for fabsf.
...@@ -1104,65 +1146,35 @@ fix = { ...@@ -1104,65 +1146,35 @@ fix = {
/* /*
* Fix hpux 10.X missing ctype declarations 1 * Fix hpux 11.00 broken vsnprintf declaration
*/ */
fix = { fix = {
hackname = hpux10_ctype_declarations1; hackname = hpux11_vsnprintf;
files = ctype.h; files = stdio.h;
select = "^#[ \t]*define _toupper\\(__c\\)[ \t]*__toupper\\(__c\\)"; select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, '
bypass = "^[ \t]*extern[ \t]*int[ \t]*__tolower[ \t]*\\("; 'const char \*,) __va__list\);';
c_fix = format; c_fix = format;
c_fix_arg = "#ifdef _PROTOTYPES\n" c_fix_arg = "%1 __va_list);";
"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"; 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 = { fix = {
hackname = hpux10_ctype_declarations2; hackname = hpux8_bogus_inlines;
files = ctype.h; files = math.h;
select = "^# if defined\\(_SB_CTYPE_MACROS\\) && \\!defined\\(__lint\\)"; select = inline;
bypass = "^[ \t]*extern[ \t]*int[ \t]*_isalnum[ \t]*\\("; sed = "s@inline int abs(int [a-z][a-z]*) {.*}"
c_fix = format; "@extern \"C\" int abs(int);@";
c_fix_arg = "%0\n\n" sed = "s@inline double abs(double [a-z][a-z]*) {.*}@@";
"#ifdef _PROTOTYPES\n" sed = "s@inline int sqr(int [a-z][a-z]*) {.*}@@";
" extern int _isalnum(int);\n" sed = "s@inline double sqr(double [a-z][a-z]*) {.*}@@";
" extern int _isalpha(int);\n" test_text = "inline int abs(int v) { return (v>=0)?v:-v; }\n"
" extern int _iscntrl(int);\n" "inline double sqr(double v) { return v**0.5; }";
" 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";
}; };
...@@ -1183,35 +1195,23 @@ fix = { ...@@ -1183,35 +1195,23 @@ fix = {
/* /*
* Fix hpux 11.00 broken vsnprintf declaration * HP-UX long_double
*/ */
fix = { fix = {
hackname = hpux11_vsnprintf; hackname = hpux_long_double;
files = stdio.h; files = stdlib.h;
select = '(extern int vsnprintf\(char \*, _[hpux]*_size_t, ' select = "extern[ \t]long_double[ \t]strtold";
'const char \*,) __va__list\);'; bypass = "long_double_t";
c_fix = format; sed = "/^#[ \t]*ifndef _LONG_DOUBLE/,/\\/\\* _LONG_DOUBLE \\*\\//D";
c_fix_arg = "%1 __va_list);"; sed = "s/long_double/long double/g";
test_text = 'extern int vsnprintf(char *, _hpux_size_t, const char *,'
' __va__list);';
};
/* test_text = "# ifndef _LONG_DOUBLE\n"
* get rid of bogus inline definitions in HP-UX 8.0 "# define _LONG_DOUBLE\n"
*/ " typedef struct {\n"
fix = { " unsigned int word1, word2, word3, word4;\n"
hackname = hpux8_bogus_inlines; " } long_double;\n"
files = math.h; "# endif /* _LONG_DOUBLE */\n"
select = inline; "extern long_double strtold(const char *, char **);\n";
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; }";
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment