diff options
author | John David Anglin <dave.anglin@nrc-cnrc.gc.ca> | 2004-01-21 20:08:22 +0000 |
---|---|---|
committer | John David Anglin <danglin@gcc.gnu.org> | 2004-01-21 20:08:22 +0000 |
commit | 4b60eb3b4a97b0f3fb6c2659c05a870da4ecef21 (patch) | |
tree | b773c74895d69c7da8c863cdba4473ad83c0fa7f | |
parent | dd69a0e038b94aca96bb0028ac1279ac243ba4e5 (diff) | |
download | gcc-4b60eb3b4a97b0f3fb6c2659c05a870da4ecef21.zip gcc-4b60eb3b4a97b0f3fb6c2659c05a870da4ecef21.tar.gz gcc-4b60eb3b4a97b0f3fb6c2659c05a870da4ecef21.tar.bz2 |
inclhack.def (hpux10_stdio_declarations, [...]): New hacks.
* fixinc/inclhack.def (hpux10_stdio_declarations, ultrix_const3,
ultrix_locale, ultrix_stdlib, ultrix_strings, ultrix_sys_time,
ultrix_unistd): New hacks.
* fixinc/tests/base/stdio.h (HPUX10_STDIO_DECLARATIONS_CHECK,
ULTRIX_CONST2_CHECK): Add checks.
* fixinc/tests/base/stdlib.h (ULTRIX_STDLIB_CHECK): Likewise.
* fixinc/tests/base/strings.h (ULTRIX_STRINGS2_CHECK): Likewise.
* fixinc/tests/base/unistd.h (ULTRIX_UNISTD_CHECK): Likewise.
* fixinc/tests/base/sys/time.h (ULTRIX_SYS_TIME_CHECK): Likewise.
* fixinc/tests/base/locale.h: New file.
* fixinc/fixincl.x: Rebuilt.
From-SVN: r76298
-rw-r--r-- | gcc/ChangeLog | 14 | ||||
-rw-r--r-- | gcc/fixinc/fixincl.x | 345 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 163 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/locale.h | 20 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/stdio.h | 12 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/stdlib.h | 14 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/strings.h | 15 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/sys/time.h | 27 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/unistd.h | 10 |
9 files changed, 615 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2cdc83e1..83a2d5c 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,17 @@ +2004-01-21 John David Anglin <dave.anglin@nrc-cnrc.gc.ca> + + * fixinc/inclhack.def (hpux10_stdio_declarations, ultrix_const3, + ultrix_locale, ultrix_stdlib, ultrix_strings, ultrix_sys_time, + ultrix_unistd): New hacks. + * fixinc/tests/base/stdio.h (HPUX10_STDIO_DECLARATIONS_CHECK, + ULTRIX_CONST2_CHECK): Add checks. + * fixinc/tests/base/stdlib.h (ULTRIX_STDLIB_CHECK): Likewise. + * fixinc/tests/base/strings.h (ULTRIX_STRINGS2_CHECK): Likewise. + * fixinc/tests/base/unistd.h (ULTRIX_UNISTD_CHECK): Likewise. + * fixinc/tests/base/sys/time.h (ULTRIX_SYS_TIME_CHECK): Likewise. + * fixinc/tests/base/locale.h: New file. + * fixinc/fixincl.x: Rebuilt. + 2004-01-21 Andreas Jaeger <aj@suse.de> Michael Matz <matz@suse.de> diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 9c85fd6..f0cecc2 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Tuesday January 20, 2004 at 03:43:24 PM PST + * It has been AutoGen-ed Wednesday January 21, 2004 at 03:05:26 PM EST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Jan 20 15:43:24 PST 2004 +/* DO NOT CVS-MERGE THIS FILE, EITHER Wed Jan 21 15:05:26 EST 2004 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 165 fixup descriptions. + * This file contains 172 fixup descriptions. * * See README for more information. * @@ -2145,6 +2145,55 @@ static const char* apzHpux10_Ctype_Declarations2Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Hpux10_Stdio_Declarations fix + */ +tSCC zHpux10_Stdio_DeclarationsName[] = + "hpux10_stdio_declarations"; + +/* + * File name selection pattern + */ +tSCC zHpux10_Stdio_DeclarationsList[] = + "|stdio.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzHpux10_Stdio_DeclarationsMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zHpux10_Stdio_DeclarationsSelect0[] = + "^#[ \t]*define _iob[ \t]*__iob"; + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zHpux10_Stdio_DeclarationsBypass0[] = + "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\("; + +#define HPUX10_STDIO_DECLARATIONS_TEST_CT 2 +static tTestDesc aHpux10_Stdio_DeclarationsTests[] = { + { TT_NEGREP, zHpux10_Stdio_DeclarationsBypass0, (regex_t*)NULL }, + { TT_EGREP, zHpux10_Stdio_DeclarationsSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Hpux10_Stdio_Declarations + */ +static const char* apzHpux10_Stdio_DeclarationsPatch[] = { + "format", + "%0\n\n\ +# if defined(__STDC__) || defined(__cplusplus)\n\ + extern int snprintf(char *, size_t, const char *, ...);\n\ + extern int vsnprintf(char *, size_t, const char *, __va_list);\n\ +# else /* not __STDC__) || __cplusplus */\n\ + extern int snprintf();\n\ + extern int vsnprintf();\n\ +# endif /* __STDC__) || __cplusplus */\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Hpux11_Abs fix */ tSCC zHpux11_AbsName[] = @@ -5601,6 +5650,42 @@ static const char* apzUltrix_Const2Patch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Ultrix_Const3 fix + */ +tSCC zUltrix_Const3Name[] = + "ultrix_const3"; + +/* + * File name selection pattern + */ +tSCC zUltrix_Const3List[] = + "|stdio.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_Const3Machs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_Const3Select0[] = + "fdopen\\( .*, char \\*"; + +#define ULTRIX_CONST3_TEST_CT 1 +static tTestDesc aUltrix_Const3Tests[] = { + { TT_EGREP, zUltrix_Const3Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Const3 + */ +static const char* apzUltrix_Const3Patch[] = { + "format", + "%1 const %3 *__", + "([ \t*](fdopen)\\(.*)[ \t]+(char|void) \\*__", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Ultrix_Fix_Fixproto fix */ tSCC zUltrix_Fix_FixprotoName[] = @@ -5673,6 +5758,40 @@ static const char* apzUltrix_IfdefPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Ultrix_Locale fix + */ +tSCC zUltrix_LocaleName[] = + "ultrix_locale"; + +/* + * File name selection pattern + */ +tSCC zUltrix_LocaleList[] = + "|locale.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_LocaleMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_LocaleSelect0[] = + "@\\(#\\)locale\\.h.*6\\.1.*\\(ULTRIX\\)"; + +#define ULTRIX_LOCALE_TEST_CT 1 +static tTestDesc aUltrix_LocaleTests[] = { + { TT_EGREP, zUltrix_LocaleSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Locale + */ +static const char* apzUltrix_LocalePatch[] = { + "wrap", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Ultrix_Math_Ifdef fix */ tSCC zUltrix_Math_IfdefName[] = @@ -5851,6 +5970,47 @@ static const char* apzUltrix_StaticPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Ultrix_Stdlib fix + */ +tSCC zUltrix_StdlibName[] = + "ultrix_stdlib"; + +/* + * File name selection pattern + */ +tSCC zUltrix_StdlibList[] = + "|stdlib.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_StdlibMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_StdlibSelect0[] = + "@\\(#\\)stdlib\\.h.*6\\.1.*\\(ULTRIX\\)"; + +#define ULTRIX_STDLIB_TEST_CT 1 +static tTestDesc aUltrix_StdlibTests[] = { + { TT_EGREP, zUltrix_StdlibSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Stdlib + */ +static const char* apzUltrix_StdlibPatch[] = { "sed", + "-e", "/^char.*getenv( const char .* );.*$/a\\\n\ +int\t\tsetenv( const char *__name, const char *__val, int __ovrwrt );\\\n\ +void\t\tunsetenv( const char *__name );\\\n\ +int\t\tputenv( char *__s );\n", + "-e", "/^char.*getenv();.*$/a\\\n\ +int\tsetenv();\\\n\ +void\tunsetenv();\\\n\ +int\tputenv();\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Ultrix_Strings fix */ tSCC zUltrix_StringsName[] = @@ -5885,6 +6045,139 @@ static const char* apzUltrix_StringsPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Ultrix_Strings2 fix + */ +tSCC zUltrix_Strings2Name[] = + "ultrix_strings2"; + +/* + * File name selection pattern + */ +tSCC zUltrix_Strings2List[] = + "|strings.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_Strings2Machs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_Strings2Select0[] = + "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; + +#define ULTRIX_STRINGS2_TEST_CT 1 +static tTestDesc aUltrix_Strings2Tests[] = { + { TT_EGREP, zUltrix_Strings2Select0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Strings2 + */ +static const char* apzUltrix_Strings2Patch[] = { "sed", + "-e", "/^.*strncmp( const .* );.*/a\\\n\ +\\\n\ +extern int\\\n\ +\tstrcasecmp( const char *__s1, const char *__s2),\\\n\ +\tstrncasecmp( const char *__s1, const char *__s2, size_t __n );\n", + "-e", "/^.*strncmp();.*/a\\\n\ +extern int\\\n\ +\tstrcasecmp(),\\\n\ +\tstrncasecmp();\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Ultrix_Sys_Time fix + */ +tSCC zUltrix_Sys_TimeName[] = + "ultrix_sys_time"; + +/* + * File name selection pattern + */ +tSCC zUltrix_Sys_TimeList[] = + "|sys/time.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_Sys_TimeMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_Sys_TimeSelect0[] = + "@\\(#\\)time\\.h.*6\\.1.*\\(ULTRIX\\)"; + +#define ULTRIX_SYS_TIME_TEST_CT 1 +static tTestDesc aUltrix_Sys_TimeTests[] = { + { TT_EGREP, zUltrix_Sys_TimeSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Sys_Time + */ +static const char* apzUltrix_Sys_TimePatch[] = { "sed", + "-e", "/^extern.*time_t.*time( time_t .* );.*$/a\\\n\ +\\\n\ +extern int adjtime(struct timeval *, struct timeval *);\\\n\ +extern int getitimer(int, struct itimerval *);\\\n\ +extern int setitimer(int, struct itimerval *, struct itimerval *);\\\n\ +extern int gettimeofday(struct timeval *, struct timezone *);\\\n\ +extern int settimeofday(struct timeval *, struct timezone *);\\\n\ +extern void profil(const void *, size_t, size_t, unsigned int);\\\n\ +extern int stime(const time_t *);\\\n\ +extern int utimes(const char *, const struct timeval[2]);\\\n\ +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);\n", + "-e", "/^extern.*double.*difftime();.*$/a\\\n\ +extern\tint adjtime();\\\n\ +extern\tint getitimer();\\\n\ +extern\tint setitimer();\\\n\ +extern\tint gettimeofday();\\\n\ +extern\tint settimeofday();\\\n\ +extern\tvoid profil();\\\n\ +extern\tint stime();\\\n\ +extern\tint utimes();\\\n\ +extern\tint select();\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Ultrix_Unistd fix + */ +tSCC zUltrix_UnistdName[] = + "ultrix_unistd"; + +/* + * File name selection pattern + */ +tSCC zUltrix_UnistdList[] = + "|unistd.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzUltrix_UnistdMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zUltrix_UnistdSelect0[] = + "@\\(#\\)unistd\\.h.*6\\.1.*\\(ULTRIX\\)"; + +#define ULTRIX_UNISTD_TEST_CT 1 +static tTestDesc aUltrix_UnistdTests[] = { + { TT_EGREP, zUltrix_UnistdSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Ultrix_Unistd + */ +static const char* apzUltrix_UnistdPatch[] = { "sed", + "-e", "/^[ \t]*getgroups(),.*$/a\\\n\ +\tgetpagesize(),\n", + "-e", "/^[ \t]*fork(),.*$/a\\\n\ +\tvfork(),\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Undefine_Null fix */ tSCC zUndefine_NullName[] = @@ -6528,9 +6821,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 185 +#define REGEX_COUNT 193 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 165 +#define FIX_COUNT 172 /* * Enumerate the fixes @@ -6586,6 +6879,7 @@ typedef enum { HPUX11_CPP_POW_INLINE_FIXIDX, HPUX10_CTYPE_DECLARATIONS1_FIXIDX, HPUX10_CTYPE_DECLARATIONS2_FIXIDX, + HPUX10_STDIO_DECLARATIONS_FIXIDX, HPUX11_ABS_FIXIDX, HPUX11_FABSF_FIXIDX, HPUX11_SIZE_T_FIXIDX, @@ -6677,14 +6971,20 @@ typedef enum { ULTRIX_ATOF_PARAM_FIXIDX, ULTRIX_CONST_FIXIDX, ULTRIX_CONST2_FIXIDX, + ULTRIX_CONST3_FIXIDX, ULTRIX_FIX_FIXPROTO_FIXIDX, ULTRIX_IFDEF_FIXIDX, + ULTRIX_LOCALE_FIXIDX, ULTRIX_MATH_IFDEF_FIXIDX, ULTRIX_NESTED_IOCTL_FIXIDX, ULTRIX_NESTED_SVC_FIXIDX, ULTRIX_STAT_FIXIDX, ULTRIX_STATIC_FIXIDX, + ULTRIX_STDLIB_FIXIDX, ULTRIX_STRINGS_FIXIDX, + ULTRIX_STRINGS2_FIXIDX, + ULTRIX_SYS_TIME_FIXIDX, + ULTRIX_UNISTD_FIXIDX, UNDEFINE_NULL_FIXIDX, UNICOSMK_RESTRICT_FIXIDX, UW7_BYTEORDER_FIX_FIXIDX, @@ -6954,6 +7254,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { HPUX10_CTYPE_DECLARATIONS2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aHpux10_Ctype_Declarations2Tests, apzHpux10_Ctype_Declarations2Patch, 0 }, + { zHpux10_Stdio_DeclarationsName, zHpux10_Stdio_DeclarationsList, + apzHpux10_Stdio_DeclarationsMachs, + HPUX10_STDIO_DECLARATIONS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aHpux10_Stdio_DeclarationsTests, apzHpux10_Stdio_DeclarationsPatch, 0 }, + { zHpux11_AbsName, zHpux11_AbsList, apzHpux11_AbsMachs, HPUX11_ABS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -7409,6 +7714,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ULTRIX_CONST2_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aUltrix_Const2Tests, apzUltrix_Const2Patch, 0 }, + { zUltrix_Const3Name, zUltrix_Const3List, + apzUltrix_Const3Machs, + ULTRIX_CONST3_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aUltrix_Const3Tests, apzUltrix_Const3Patch, 0 }, + { zUltrix_Fix_FixprotoName, zUltrix_Fix_FixprotoList, apzUltrix_Fix_FixprotoMachs, ULTRIX_FIX_FIXPROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -7419,6 +7729,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ULTRIX_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aUltrix_IfdefTests, apzUltrix_IfdefPatch, 0 }, + { zUltrix_LocaleName, zUltrix_LocaleList, + apzUltrix_LocaleMachs, + ULTRIX_LOCALE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aUltrix_LocaleTests, apzUltrix_LocalePatch, 0 }, + { zUltrix_Math_IfdefName, zUltrix_Math_IfdefList, apzUltrix_Math_IfdefMachs, ULTRIX_MATH_IFDEF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, @@ -7444,11 +7759,31 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ULTRIX_STATIC_TEST_CT, FD_MACH_ONLY, aUltrix_StaticTests, apzUltrix_StaticPatch, 0 }, + { zUltrix_StdlibName, zUltrix_StdlibList, + apzUltrix_StdlibMachs, + ULTRIX_STDLIB_TEST_CT, FD_MACH_ONLY, + aUltrix_StdlibTests, apzUltrix_StdlibPatch, 0 }, + { zUltrix_StringsName, zUltrix_StringsList, apzUltrix_StringsMachs, ULTRIX_STRINGS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aUltrix_StringsTests, apzUltrix_StringsPatch, 0 }, + { zUltrix_Strings2Name, zUltrix_Strings2List, + apzUltrix_Strings2Machs, + ULTRIX_STRINGS2_TEST_CT, FD_MACH_ONLY, + aUltrix_Strings2Tests, apzUltrix_Strings2Patch, 0 }, + + { zUltrix_Sys_TimeName, zUltrix_Sys_TimeList, + apzUltrix_Sys_TimeMachs, + ULTRIX_SYS_TIME_TEST_CT, FD_MACH_ONLY, + aUltrix_Sys_TimeTests, apzUltrix_Sys_TimePatch, 0 }, + + { zUltrix_UnistdName, zUltrix_UnistdList, + apzUltrix_UnistdMachs, + ULTRIX_UNISTD_TEST_CT, FD_MACH_ONLY, + aUltrix_UnistdTests, apzUltrix_UnistdPatch, 0 }, + { zUndefine_NullName, zUndefine_NullList, apzUndefine_NullMachs, UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 9459f87..a052274 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -1266,6 +1266,28 @@ fix = { /* + * Fix hpux 10.X missing stdio declarations + */ +fix = { + hackname = hpux10_stdio_declarations; + files = stdio.h; + select = "^#[ \t]*define _iob[ \t]*__iob"; + bypass = "^[ \t]*extern[ \t]*int[ \t]*vsnprintf[ \t]*\\("; + c_fix = format; + c_fix_arg = "%0\n\n" + "# if defined(__STDC__) || defined(__cplusplus)\n" + " extern int snprintf(char *, size_t, const char *, ...);\n" + " extern int vsnprintf(char *, size_t, const char *, __va_list);\n" + "# else /* not __STDC__) || __cplusplus */\n" + " extern int snprintf();\n" + " extern int vsnprintf();\n" + "# endif /* __STDC__) || __cplusplus */\n"; + + test_text = "# define _iob __iob\n"; +}; + + +/* * Make sure hpux defines abs in header. */ fix = { @@ -3446,6 +3468,24 @@ fix = { /* + * parameters not const on Ultrix V4.3. + */ +fix = { + hackname = ultrix_const3; + files = stdio.h; + select = 'fdopen\( .*, char \*'; + + c_fix = format; + c_fix_arg = "%1 const %3 *__"; + c_fix_arg = "([ \t*](fdopen)\\(.*)" + "[ \t]+(char|void) \\*__"; + + test_text = + "extern FILE * fdopen( int __filedes, char *__type );\n"; +}; + + +/* * Ultrix V4.[35] puts the declaration of uname before the definition * of struct utsname, so the prototype (added by fixproto) causes havoc. */ @@ -3480,6 +3520,19 @@ fix = { /* + * Add once-only latch to Ultrix V4.3 locale.h. + */ +fix = { + hackname = ultrix_locale; + files = locale.h; + select = "@\\(#\\)locale\\.h.*6\\.1.*\\(ULTRIX\\)"; + c_fix = wrap; + test_text = + "@(#)locale.h 6.1 (ULTRIX)\n"; +}; + + +/* * Strip "|| CC$gfloat" from Ultrix math headers. */ fix = { @@ -3559,6 +3612,31 @@ fix = { /* + * Add missing declarations to Ultrix V4.3 stdlib.h. + */ +fix = { + hackname = ultrix_stdlib; + files = stdlib.h; + select = "@\\(#\\)stdlib\\.h.*6\\.1.*\\(ULTRIX\\)"; + + sed = "/^char.*getenv( const char .* );.*$/a\\\n" + "int\t\tsetenv( const char *__name, const char *__val, int __ovrwrt );\\\n" + "void\t\tunsetenv( const char *__name );\\\n" + "int\t\tputenv( char *__s );\n"; + + sed = "/^char.*getenv();.*$/a\\\n" + "int\tsetenv();\\\n" + "void\tunsetenv();\\\n" + "int\tputenv();\n"; + + test_text = + "@(#)stdlib.h 6.1 (ULTRIX)\n" + "char * getenv( const char *__name );\n" + "char *getenv();\n"; +}; + + +/* * Add once-only latch to Ultrix V4.3 strings.h. */ fix = { @@ -3572,6 +3650,91 @@ fix = { /* + * Add missing declarations to Ultrix V4.3 strings.h. + */ +fix = { + hackname = ultrix_strings2; + files = strings.h; + select = "@\\(#\\)strings\\.h.*6\\.1.*\\(ULTRIX\\)"; + + sed = "/^.*strncmp( const .* );.*/a\\\n" + "\\\n" + "extern int\\\n" + "\tstrcasecmp( const char *__s1, const char *__s2),\\\n" + "\tstrncasecmp( const char *__s1, const char *__s2, size_t __n );\n"; + + sed = "/^.*strncmp();.*/a\\\n" + "extern int\\\n" + "\tstrcasecmp(),\\\n" + "\tstrncasecmp();\n"; + + test_text = + "@(#)strings.h 6.1 (ULTRIX)\n" + "\tstrncmp( const char *__s1, const char *__s2, size_t __n );\n" + "\tstrncmp();\n"; +}; + + +/* + * Add missing declarations to Ultrix V4.3 sys/time.h. + */ +fix = { + hackname = ultrix_sys_time; + files = sys/time.h; + select = "@\\(#\\)time\\.h.*6\\.1.*\\(ULTRIX\\)"; + + sed = "/^extern.*time_t.*time( time_t .* );.*$/a\\\n" + "\\\n" + "extern int adjtime(struct timeval *, struct timeval *);\\\n" + "extern int getitimer(int, struct itimerval *);\\\n" + "extern int setitimer(int, struct itimerval *, struct itimerval *);\\\n" + "extern int gettimeofday(struct timeval *, struct timezone *);\\\n" + "extern int settimeofday(struct timeval *, struct timezone *);\\\n" + "extern void profil(const void *, size_t, size_t, unsigned int);\\\n" + "extern int stime(const time_t *);\\\n" + "extern int utimes(const char *, const struct timeval[2]);\\\n" + "extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *);\n"; + + sed = "/^extern.*double.*difftime();.*$/a\\\n" + "extern\tint adjtime();\\\n" + "extern\tint getitimer();\\\n" + "extern\tint setitimer();\\\n" + "extern\tint gettimeofday();\\\n" + "extern\tint settimeofday();\\\n" + "extern\tvoid profil();\\\n" + "extern\tint stime();\\\n" + "extern\tint utimes();\\\n" + "extern\tint select();\n"; + + test_text = + "@(#)time.h 6.1 (ULTRIX)\n" + "extern time_t time( time_t *__tloc );\n" + "extern double difftime();\n"; +}; + + +/* + * Add missing declarations to Ultrix V4.3 unistd.h. + */ +fix = { + hackname = ultrix_unistd; + files = unistd.h; + select = "@\\(#\\)unistd\\.h.*6\\.1.*\\(ULTRIX\\)"; + + sed = "/^[ \t]*getgroups(),.*$/a\\\n" + "\tgetpagesize(),\n"; + + sed = "/^[ \t]*fork(),.*$/a\\\n" + "\tvfork(),\n"; + + test_text = + "@(#)unistd.h 6.1 (ULTRIX)\n" + "\tgetgroups(),\n" + "\tfork(),\n"; +}; + + +/* * Fix multiple defines for NULL. Sometimes, we stumble into \r\n * terminated lines, so accommodate these. Test both ways. * Don't bother to reproduce the \r\n termination, as GCC has to diff --git a/gcc/fixinc/tests/base/locale.h b/gcc/fixinc/tests/base/locale.h new file mode 100644 index 0000000..3b079e5 --- /dev/null +++ b/gcc/fixinc/tests/base/locale.h @@ -0,0 +1,20 @@ +/* DO NOT EDIT THIS FILE. + + It has been auto-edited by fixincludes from: + + "fixinc/tests/inc/locale.h" + + This had to be done to correct non-standard usages in the + original, manufacturer supplied header file. */ + +#ifndef FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE +#define FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE 1 + + + +#if defined( ULTRIX_LOCALE_CHECK ) +@(#)locale.h 6.1 (ULTRIX) + +#endif /* ULTRIX_LOCALE_CHECK */ + +#endif /* FIXINC_WRAP_LOCALE_H_ULTRIX_LOCALE */ diff --git a/gcc/fixinc/tests/base/stdio.h b/gcc/fixinc/tests/base/stdio.h index e4130e6..ea2c001 100644 --- a/gcc/fixinc/tests/base/stdio.h +++ b/gcc/fixinc/tests/base/stdio.h @@ -26,6 +26,12 @@ int vfscanf(FILE *, const char *, __builtin_va_list) __asm__ (_BSD_STRING(__USER #endif /* BSD_STDIO_ATTRS_CONFLICT_CHECK */ +#if defined( HPUX10_STDIO_DECLARATIONS_CHECK ) +# define _iob __iob + +#endif /* HPUX10_STDIO_DECLARATIONS_CHECK */ + + #if defined( HPUX11_SNPRINTF_CHECK ) extern int snprintf(char *, size_t, const char *, ...); extern int snprintf(char *, _hpux_size_t, const char *, ...); @@ -90,6 +96,12 @@ extern char *tempnam( const char *, const char *); #endif /* ULTRIX_CONST2_CHECK */ +#if defined( ULTRIX_CONST3_CHECK ) +extern FILE * fdopen( int __filedes, const char *__type ); + +#endif /* ULTRIX_CONST3_CHECK */ + + #if defined( UNICOSMK_RESTRICT_CHECK ) void f (char * __restrict__ x); #endif /* UNICOSMK_RESTRICT_CHECK */ diff --git a/gcc/fixinc/tests/base/stdlib.h b/gcc/fixinc/tests/base/stdlib.h index 7297a3a..0e1e59c 100644 --- a/gcc/fixinc/tests/base/stdlib.h +++ b/gcc/fixinc/tests/base/stdlib.h @@ -50,3 +50,17 @@ extern void * bsearch(void*,size_t,size_t); int atexit( void (*__func)( void ) ); #endif /* ULTRIX_ATEXIT_PARAM_CHECK */ + + +#if defined( ULTRIX_STDLIB_CHECK ) +@(#)stdlib.h 6.1 (ULTRIX) +char * getenv( const char *__name ); +int setenv( const char *__name, const char *__val, int __ovrwrt ); +void unsetenv( const char *__name ); +int putenv( char *__s ); +char *getenv(); +int setenv(); +void unsetenv(); +int putenv(); + +#endif /* ULTRIX_STDLIB_CHECK */ diff --git a/gcc/fixinc/tests/base/strings.h b/gcc/fixinc/tests/base/strings.h index 36ca0b4..f17d3f8 100644 --- a/gcc/fixinc/tests/base/strings.h +++ b/gcc/fixinc/tests/base/strings.h @@ -22,4 +22,19 @@ #endif /* ULTRIX_STRINGS_CHECK */ + +#if defined( ULTRIX_STRINGS2_CHECK ) +@(#)strings.h 6.1 (ULTRIX) + strncmp( const char *__s1, const char *__s2, size_t __n ); + +extern int + strcasecmp( const char *__s1, const char *__s2), + strncasecmp( const char *__s1, const char *__s2, size_t __n ); + strncmp(); +extern int + strcasecmp(), + strncasecmp(); + +#endif /* ULTRIX_STRINGS2_CHECK */ + #endif /* FIXINC_WRAP_STRINGS_H_ULTRIX_STRINGS */ diff --git a/gcc/fixinc/tests/base/sys/time.h b/gcc/fixinc/tests/base/sys/time.h index 931f424..f009f7e 100644 --- a/gcc/fixinc/tests/base/sys/time.h +++ b/gcc/fixinc/tests/base/sys/time.h @@ -12,3 +12,30 @@ #if defined( HPUX_SYSTIME_CHECK ) struct sigevent; #endif /* HPUX_SYSTIME_CHECK */ + + +#if defined( ULTRIX_SYS_TIME_CHECK ) +@(#)time.h 6.1 (ULTRIX) +extern time_t time( time_t *__tloc ); + +extern int adjtime(struct timeval *, struct timeval *); +extern int getitimer(int, struct itimerval *); +extern int setitimer(int, struct itimerval *, struct itimerval *); +extern int gettimeofday(struct timeval *, struct timezone *); +extern int settimeofday(struct timeval *, struct timezone *); +extern void profil(const void *, size_t, size_t, unsigned int); +extern int stime(const time_t *); +extern int utimes(const char *, const struct timeval[2]); +extern int select(int, fd_set *, fd_set *, fd_set *, struct timeval *); +extern double difftime(); +extern int adjtime(); +extern int getitimer(); +extern int setitimer(); +extern int gettimeofday(); +extern int settimeofday(); +extern void profil(); +extern int stime(); +extern int utimes(); +extern int select(); + +#endif /* ULTRIX_SYS_TIME_CHECK */ diff --git a/gcc/fixinc/tests/base/unistd.h b/gcc/fixinc/tests/base/unistd.h index 5bfb9b9..98e8c34 100644 --- a/gcc/fixinc/tests/base/unistd.h +++ b/gcc/fixinc/tests/base/unistd.h @@ -21,3 +21,13 @@ extern pid_t getpgid(pid_t); extern int getpagesize(); extern int getpgid(); #endif /* SOLARIS_UNISTD_CHECK */ + + +#if defined( ULTRIX_UNISTD_CHECK ) +@(#)unistd.h 6.1 (ULTRIX) + getgroups(), + getpagesize(), + fork(), + vfork(), + +#endif /* ULTRIX_UNISTD_CHECK */ |