Commit 1d109416 by Nathanael Nerode Committed by Nathanael Nerode

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
parent dc5c3188
2003-08-25 Nathanael Nerode <neroden@twcny.rr.com>
* fixinc/inclhack.def (svr4_sighandler_type): New fix, ported
from fixinc.svr4.
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/sys/signal.h: Regenerate.
2003-08-25 Ulrich Weigand <uweigand@de.ibm.com> 2003-08-25 Ulrich Weigand <uweigand@de.ibm.com>
* combine.c (simplify_comparison): Re-enable widening of comparisons * combine.c (simplify_comparison): Re-enable widening of comparisons
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * 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 * From the definitions inclhack.def
* and the template file fixincl * 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. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work * 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. * 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. * See README for more information.
* *
...@@ -4982,6 +4982,41 @@ static const char* apzSvr4_ProfilPatch[] = { ...@@ -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 * Description of Svr4_Undeclared_Getrnge fix
*/ */
tSCC zSvr4_Undeclared_GetrngeName[] = tSCC zSvr4_Undeclared_GetrngeName[] =
...@@ -6236,9 +6271,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -6236,9 +6271,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 177 #define REGEX_COUNT 178
#define MACH_LIST_SIZE_LIMIT 261 #define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 157 #define FIX_COUNT 158
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -6368,6 +6403,7 @@ typedef enum { ...@@ -6368,6 +6403,7 @@ typedef enum {
SVR4_GETCWD_FIXIDX, SVR4_GETCWD_FIXIDX,
SVR4_KRNL_FIXIDX, SVR4_KRNL_FIXIDX,
SVR4_PROFIL_FIXIDX, SVR4_PROFIL_FIXIDX,
SVR4_SIGHANDLER_TYPE_FIXIDX,
SVR4_UNDECLARED_GETRNGE_FIXIDX, SVR4_UNDECLARED_GETRNGE_FIXIDX,
SYSV68_STRING_FIXIDX, SYSV68_STRING_FIXIDX,
SYSZ_STDLIB_FOR_SUN_FIXIDX, SYSZ_STDLIB_FOR_SUN_FIXIDX,
...@@ -7024,6 +7060,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -7024,6 +7060,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, SVR4_PROFIL_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aSvr4_ProfilTests, apzSvr4_ProfilPatch, 0 }, 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, { zSvr4_Undeclared_GetrngeName, zSvr4_Undeclared_GetrngeList,
apzSvr4_Undeclared_GetrngeMachs, apzSvr4_Undeclared_GetrngeMachs,
SVR4_UNDECLARED_GETRNGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, SVR4_UNDECLARED_GETRNGE_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
......
...@@ -2978,6 +2978,22 @@ fix = { ...@@ -2978,6 +2978,22 @@ fix = {
}; };
#endif #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. * Put storage class at start of decl, to avoid warning.
*/ */
......
...@@ -21,3 +21,10 @@ void (*signal(...))(...); ...@@ -21,3 +21,10 @@ void (*signal(...))(...);
void (*signal())(); void (*signal())();
#endif #endif
#endif /* SUN_SIGNAL_CHECK */ #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 */
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