diff options
author | Adam Nemet <anemet@lnxw.com> | 2004-09-10 13:56:50 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2004-09-10 13:56:50 +0000 |
commit | d635c70797688ead5f670ad5b176b12c0129b74f (patch) | |
tree | a8e8932efa0ab6fe75534e82ba535ebe41512099 | |
parent | 85d625202998b5153d40cf1fbc36a400e8e013dd (diff) | |
download | gcc-d635c70797688ead5f670ad5b176b12c0129b74f.zip gcc-d635c70797688ead5f670ad5b176b12c0129b74f.tar.gz gcc-d635c70797688ead5f670ad5b176b12c0129b74f.tar.bz2 |
inclhack.def (lynx_void_int): Remove.
* inclhack.def (lynx_void_int): Remove.
(lynxos_fcntl_proto): Remove.
(lynxos_no_warning_in_sys_time_h): New fix.
(lynxos_missing_putenv): New fix.
* fixincl.x: Regenerate.
* tests/base/fcntl.h: Remove.
* tests/base/sys/time.h: Update from test area.
* tests/base/curses.h: Likewise.
* tests/base/stdlib.h: Likewise.
From-SVN: r87298
-rw-r--r-- | fixincludes/ChangeLog | 12 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 92 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 34 | ||||
-rw-r--r-- | fixincludes/tests/base/curses.h | 5 | ||||
-rw-r--r-- | fixincludes/tests/base/fcntl.h | 14 | ||||
-rw-r--r-- | fixincludes/tests/base/stdlib.h | 6 | ||||
-rw-r--r-- | fixincludes/tests/base/sys/time.h | 5 |
7 files changed, 93 insertions, 75 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index f22c4e1..0119a59 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,15 @@ +2004-09-10 Adam Nemet <anemet@lnxw.com> + + * inclhack.def (lynx_void_int): Remove. + (lynxos_fcntl_proto): Remove. + (lynxos_no_warning_in_sys_time_h): New fix. + (lynxos_missing_putenv): New fix. + * fixincl.x: Regenerate. + * tests/base/fcntl.h: Remove. + * tests/base/sys/time.h: Update from test area. + * tests/base/curses.h: Likewise. + * tests/base/stdlib.h: Likewise. + 2004-09-03 Jan Beulich <jbeulich@novell.com> * inclhack.def: Suppress exception_structure and math_exception diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 86032ab..2089ac3 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Saturday August 14, 2004 at 05:48:43 PM EDT + * It has been AutoGen-ed Thursday September 9, 2004 at 08:07:32 PM PDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Aug 14 17:48:43 EDT 2004 +/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Sep 9 20:07:32 PDT 2004 * * You must regenerate it. Use the ./genfixes script. * @@ -3333,73 +3333,83 @@ static const char* apzLimits_IfndefsPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Lynx_Void_Int fix + * Description of Lynxos_No_Warning_In_Sys_Time_H fix */ -tSCC zLynx_Void_IntName[] = - "lynx_void_int"; +tSCC zLynxos_No_Warning_In_Sys_Time_HName[] = + "lynxos_no_warning_in_sys_time_h"; /* * File name selection pattern */ -tSCC zLynx_Void_IntList[] = - "|curses.h|"; +tSCC zLynxos_No_Warning_In_Sys_Time_HList[] = + "|sys/time.h|"; /* * Machine/OS name selection pattern */ -#define apzLynx_Void_IntMachs (const char**)NULL +#define apzLynxos_No_Warning_In_Sys_Time_HMachs (const char**)NULL /* * content selection pattern - do fix if pattern found */ -tSCC zLynx_Void_IntSelect0[] = - "#[ \t]*define[ \t]+void[ \t]+int[ \t]*"; +tSCC zLynxos_No_Warning_In_Sys_Time_HSelect0[] = + "#warning[ \t]+Using <time.h> instead of <sys/time.h>"; -#define LYNX_VOID_INT_TEST_CT 1 -static tTestDesc aLynx_Void_IntTests[] = { - { TT_EGREP, zLynx_Void_IntSelect0, (regex_t*)NULL }, }; +#define LYNXOS_NO_WARNING_IN_SYS_TIME_H_TEST_CT 1 +static tTestDesc aLynxos_No_Warning_In_Sys_Time_HTests[] = { + { TT_EGREP, zLynxos_No_Warning_In_Sys_Time_HSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Lynx_Void_Int + * Fix Command Arguments for Lynxos_No_Warning_In_Sys_Time_H */ -static const char* apzLynx_Void_IntPatch[] = { +static const char* apzLynxos_No_Warning_In_Sys_Time_HPatch[] = { "format", "", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description of Lynxos_Fcntl_Proto fix + * Description of Lynxos_Missing_Putenv fix */ -tSCC zLynxos_Fcntl_ProtoName[] = - "lynxos_fcntl_proto"; +tSCC zLynxos_Missing_PutenvName[] = + "lynxos_missing_putenv"; /* * File name selection pattern */ -tSCC zLynxos_Fcntl_ProtoList[] = - "|fcntl.h|"; +tSCC zLynxos_Missing_PutenvList[] = + "|stdlib.h|"; /* * Machine/OS name selection pattern */ -#define apzLynxos_Fcntl_ProtoMachs (const char**)NULL +tSCC* apzLynxos_Missing_PutenvMachs[] = { + "*-*-lynxos*", + (const char*)NULL }; /* * content selection pattern - do fix if pattern found */ -tSCC zLynxos_Fcntl_ProtoSelect0[] = - "fcntl[ \t]*\\(int, int, int\\)"; +tSCC zLynxos_Missing_PutenvSelect0[] = + "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);"; -#define LYNXOS_FCNTL_PROTO_TEST_CT 1 -static tTestDesc aLynxos_Fcntl_ProtoTests[] = { - { TT_EGREP, zLynxos_Fcntl_ProtoSelect0, (regex_t*)NULL }, }; +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zLynxos_Missing_PutenvBypass0[] = + "putenv[ \\t]*\\("; + +#define LYNXOS_MISSING_PUTENV_TEST_CT 2 +static tTestDesc aLynxos_Missing_PutenvTests[] = { + { TT_NEGREP, zLynxos_Missing_PutenvBypass0, (regex_t*)NULL }, + { TT_EGREP, zLynxos_Missing_PutenvSelect0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Lynxos_Fcntl_Proto + * Fix Command Arguments for Lynxos_Missing_Putenv */ -static const char* apzLynxos_Fcntl_ProtoPatch[] = { +static const char* apzLynxos_Missing_PutenvPatch[] = { "format", - "%1...)", - "(fcntl[ \t]*\\(int, int, )int\\)", + "%0\n\ +extern int putenv\t\t\t\t_AP((char *));", + "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -7018,7 +7028,7 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 199 +#define REGEX_COUNT 200 #define MACH_LIST_SIZE_LIMIT 261 #define FIX_COUNT 177 @@ -7107,8 +7117,8 @@ typedef enum { LIBC1_G_VA_LIST_FIXIDX, LIBC1_IFDEFD_MEMX_FIXIDX, LIMITS_IFNDEFS_FIXIDX, - LYNX_VOID_INT_FIXIDX, - LYNXOS_FCNTL_PROTO_FIXIDX, + LYNXOS_NO_WARNING_IN_SYS_TIME_H_FIXIDX, + LYNXOS_MISSING_PUTENV_FIXIDX, MACHINE_ANSI_H_VA_LIST_FIXIDX, MACHINE_NAME_FIXIDX, MATH_EXCEPTION_FIXIDX, @@ -7611,15 +7621,15 @@ tFixDesc fixDescList[ FIX_COUNT ] = { LIMITS_IFNDEFS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aLimits_IfndefsTests, apzLimits_IfndefsPatch, 0 }, - { zLynx_Void_IntName, zLynx_Void_IntList, - apzLynx_Void_IntMachs, - LYNX_VOID_INT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLynx_Void_IntTests, apzLynx_Void_IntPatch, 0 }, + { zLynxos_No_Warning_In_Sys_Time_HName, zLynxos_No_Warning_In_Sys_Time_HList, + apzLynxos_No_Warning_In_Sys_Time_HMachs, + LYNXOS_NO_WARNING_IN_SYS_TIME_H_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aLynxos_No_Warning_In_Sys_Time_HTests, apzLynxos_No_Warning_In_Sys_Time_HPatch, 0 }, - { zLynxos_Fcntl_ProtoName, zLynxos_Fcntl_ProtoList, - apzLynxos_Fcntl_ProtoMachs, - LYNXOS_FCNTL_PROTO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aLynxos_Fcntl_ProtoTests, apzLynxos_Fcntl_ProtoPatch, 0 }, + { zLynxos_Missing_PutenvName, zLynxos_Missing_PutenvList, + apzLynxos_Missing_PutenvMachs, + LYNXOS_MISSING_PUTENV_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aLynxos_Missing_PutenvTests, apzLynxos_Missing_PutenvPatch, 0 }, { zMachine_Ansi_H_Va_ListName, zMachine_Ansi_H_Va_ListList, apzMachine_Ansi_H_Va_ListMachs, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 537155c..ef32025 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -1870,31 +1870,35 @@ fix = { }; #endif - -/* - * Delete the '#define void int' line from curses.h on Lynx +/* + * Remove header file warning from sys/time.h. Autoconf's + * AC_HEADER_TIME recommends to include both sys/time.h and time.h + * which causes warning on LynxOS. Remove the warning. */ fix = { - hackname = lynx_void_int; - files = curses.h; - select = "#[ \t]*define[ \t]+void[ \t]+int[ \t]*"; + hackname = lynxos_no_warning_in_sys_time_h; + files = sys/time.h; + select = "#warning[ \t]+Using <time.h> instead of <sys/time.h>"; c_fix = format; c_fix_arg = ""; - test_text = "# define\tvoid\tint \t/* curses foiled again */"; + test_text = "#warning Using <time.h> instead of <sys/time.h>"; }; -/* - * Fix fcntl prototype in fcntl.h on LynxOS. +/* + * Add missing declaration for putenv. */ fix = { - hackname = lynxos_fcntl_proto; - files = fcntl.h; - select = "fcntl[ \t]*" '\(int, int, int\)'; + hackname = lynxos_missing_putenv; + mach = '*-*-lynxos*'; + files = stdlib.h; + bypass = 'putenv[ \t]*\\('; + select = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);"; c_fix = format; - c_fix_arg = '%1...)'; - c_fix_arg = "(fcntl[ \t]*" '\(int, int, )int\)'; - test_text = "extern int fcntl(int, int, int);"; + c_fix_arg = "%0\n" + "extern int putenv _AP((char *));"; + c_fix_arg = "extern char \\*getenv[ \t]*_AP\\(\\(const char \\*\\)\\);"; + test_text = "extern char *getenv _AP((const char *));"; }; diff --git a/fixincludes/tests/base/curses.h b/fixincludes/tests/base/curses.h index ba2db24..eb2067e 100644 --- a/fixincludes/tests/base/curses.h +++ b/fixincludes/tests/base/curses.h @@ -30,11 +30,6 @@ struct term; #endif /* BAD_STRUCT_TERM_CHECK */ -#if defined( LYNX_VOID_INT_CHECK ) -/* curses foiled again */ -#endif /* LYNX_VOID_INT_CHECK */ - - #if defined( VOID_NULL_CHECK ) #ifndef NULL #define NULL 0 /* typed NULL */ diff --git a/fixincludes/tests/base/fcntl.h b/fixincludes/tests/base/fcntl.h deleted file mode 100644 index ad6c8c9..0000000 --- a/fixincludes/tests/base/fcntl.h +++ /dev/null @@ -1,14 +0,0 @@ -/* DO NOT EDIT THIS FILE. - - It has been auto-edited by fixincludes from: - - "fixinc/tests/inc/fcntl.h" - - This had to be done to correct non-standard usages in the - original, manufacturer supplied header file. */ - - - -#if defined( LYNXOS_FCNTL_PROTO_CHECK ) -extern int fcntl(int, int, ...); -#endif /* LYNXOS_FCNTL_PROTO_CHECK */ diff --git a/fixincludes/tests/base/stdlib.h b/fixincludes/tests/base/stdlib.h index 0e1e59c..d1d4f37 100644 --- a/fixincludes/tests/base/stdlib.h +++ b/fixincludes/tests/base/stdlib.h @@ -27,6 +27,12 @@ extern void exit(void*); #endif /* INT_ABORT_FREE_AND_EXIT_CHECK */ +#if defined( LYNX_MISSING_PUTENV_CHECK ) +extern char *getenv _AP((const char *)); +extern int putenv _AP((char *)); +#endif /* LYNX_MISSING_PUTENV_CHECK */ + + #if defined( SVR4_GETCWD_CHECK ) extern char* getcwd(char *, size_t); #endif /* SVR4_GETCWD_CHECK */ diff --git a/fixincludes/tests/base/sys/time.h b/fixincludes/tests/base/sys/time.h index f009f7e..d669df0 100644 --- a/fixincludes/tests/base/sys/time.h +++ b/fixincludes/tests/base/sys/time.h @@ -14,6 +14,11 @@ struct sigevent; #endif /* HPUX_SYSTIME_CHECK */ +#if defined( LYNX_NO_WARNING_IN_SYS_TIME_H_CHECK ) + +#endif /* LYNX_NO_WARNING_IN_SYS_TIME_H_CHECK */ + + #if defined( ULTRIX_SYS_TIME_CHECK ) @(#)time.h 6.1 (ULTRIX) extern time_t time( time_t *__tloc ); |