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
This commit is contained in:
Nathanael Nerode 2003-08-25 21:54:14 +00:00 committed by Nathanael Nerode
parent dc5c3188aa
commit 1d10941673
4 changed files with 76 additions and 5 deletions

View File

@ -1,3 +1,10 @@
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>
* combine.c (simplify_comparison): Re-enable widening of comparisons

View File

@ -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.
*
@ -4980,6 +4980,41 @@ static const char* apzSvr4_ProfilPatch[] = {
"profil(unsigned short *, size_t, int, unsigned int)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* 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
@ -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,

View File

@ -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.
*/

View File

@ -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 */