diff options
author | Nathanael Nerode <neroden@twcny.rr.com> | 2003-08-25 21:54:14 +0000 |
---|---|---|
committer | Nathanael Nerode <neroden@gcc.gnu.org> | 2003-08-25 21:54:14 +0000 |
commit | 1d10941673c5b7592235262a11ef1280121914c7 (patch) | |
tree | a7bd019838ab732239e4df3abcb53fb2bd6cadc7 /gcc/fixinc | |
parent | dc5c3188aa4570a39f45540a5e2c823aebb38ff3 (diff) | |
download | gcc-1d10941673c5b7592235262a11ef1280121914c7.zip gcc-1d10941673c5b7592235262a11ef1280121914c7.tar.gz gcc-1d10941673c5b7592235262a11ef1280121914c7.tar.bz2 |
inclhack.def (svr4_sighandler_type): New fix, ported from fixinc.svr4.
* fixinc/inclhack.def (svr4_sighandler_type): New fix, ported
from fixinc.svr4.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/sys/signal.h: Regenerate.
From-SVN: r70786
Diffstat (limited to 'gcc/fixinc')
-rw-r--r-- | gcc/fixinc/fixincl.x | 51 | ||||
-rw-r--r-- | gcc/fixinc/inclhack.def | 16 | ||||
-rw-r--r-- | gcc/fixinc/tests/base/sys/signal.h | 7 |
3 files changed, 69 insertions, 5 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index 5b689df..c8ac74a 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 Sunday August 17, 2003 at 01:31:26 AM EDT + * It has been AutoGen-ed Sunday August 24, 2003 at 03:26:44 PM EDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Aug 17 01:31:26 EDT 2003 +/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Aug 24 15:26:44 EDT 2003 * * 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 157 fixup descriptions. + * This file contains 158 fixup descriptions. * * See README for more information. * @@ -4982,6 +4982,41 @@ static const char* apzSvr4_ProfilPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Svr4_Sighandler_Type fix + */ +tSCC zSvr4_Sighandler_TypeName[] = + "svr4_sighandler_type"; + +/* + * File name selection pattern + */ +tSCC zSvr4_Sighandler_TypeList[] = + "|sys/signal.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzSvr4_Sighandler_TypeMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zSvr4_Sighandler_TypeSelect0[] = + "void *\\(\\*\\)\\(\\)"; + +#define SVR4_SIGHANDLER_TYPE_TEST_CT 1 +static tTestDesc aSvr4_Sighandler_TypeTests[] = { + { TT_EGREP, zSvr4_Sighandler_TypeSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Svr4_Sighandler_Type + */ +static const char* apzSvr4_Sighandler_TypePatch[] = { + "format", + "void (*)(int)", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Svr4_Undeclared_Getrnge fix */ tSCC zSvr4_Undeclared_GetrngeName[] = @@ -6236,9 +6271,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 177 +#define REGEX_COUNT 178 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 157 +#define FIX_COUNT 158 /* * Enumerate the fixes @@ -6368,6 +6403,7 @@ typedef enum { SVR4_GETCWD_FIXIDX, SVR4_KRNL_FIXIDX, SVR4_PROFIL_FIXIDX, + SVR4_SIGHANDLER_TYPE_FIXIDX, SVR4_UNDECLARED_GETRNGE_FIXIDX, SYSV68_STRING_FIXIDX, SYSZ_STDLIB_FOR_SUN_FIXIDX, @@ -7024,6 +7060,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aSvr4_ProfilTests, apzSvr4_ProfilPatch, 0 }, + { zSvr4_Sighandler_TypeName, zSvr4_Sighandler_TypeList, + apzSvr4_Sighandler_TypeMachs, + SVR4_SIGHANDLER_TYPE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aSvr4_Sighandler_TypeTests, apzSvr4_Sighandler_TypePatch, 0 }, + { zSvr4_Undeclared_GetrngeName, zSvr4_Undeclared_GetrngeList, apzSvr4_Undeclared_GetrngeMachs, SVR4_UNDECLARED_GETRNGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def index 8dd5f1c..4eade8c 100644 --- a/gcc/fixinc/inclhack.def +++ b/gcc/fixinc/inclhack.def @@ -2978,6 +2978,22 @@ fix = { }; #endif + +/* + * Correct types for signal handler constants like SIG_DFL; they might be + * void (*) (), and should be void (*) (int). C++ doesn't like the + * old style. + */ +fix = { + hackname = svr4_sighandler_type; + files = sys/signal.h; + select = 'void *\(\*\)\(\)'; + c_fix = format; + c_fix_arg = "void (*)(int)"; + test_text = "#define SIG_DFL (void(*)())0\n" + "#define SIG_IGN (void (*)())0\n"; +}; + /* * Put storage class at start of decl, to avoid warning. */ diff --git a/gcc/fixinc/tests/base/sys/signal.h b/gcc/fixinc/tests/base/sys/signal.h index 9e4fdb8..7a9ecb1 100644 --- a/gcc/fixinc/tests/base/sys/signal.h +++ b/gcc/fixinc/tests/base/sys/signal.h @@ -21,3 +21,10 @@ void (*signal(...))(...); void (*signal())(); #endif #endif /* SUN_SIGNAL_CHECK */ + + +#if defined( SVR4_SIGHANDLER_TYPE_CHECK ) +#define SIG_DFL (void (*)(int))0 +#define SIG_IGN (void (*)(int))0 + +#endif /* SVR4_SIGHANDLER_TYPE_CHECK */ |