michael@407: Index: fixincludes/fixincl.x michael@407: diff -Nau fixincludes/fixincl.x.orig fixincludes/fixincl.x michael@407: --- fixincludes/fixincl.x.orig 2010-11-09 11:26:09.000000000 +0100 michael@407: +++ fixincludes/fixincl.x 2012-03-18 17:12:11.061364028 +0100 michael@407: @@ -15,7 +15,7 @@ michael@407: * certain ANSI-incompatible system header files which are fixed to work michael@407: * correctly with ANSI C and placed in a directory that GNU C will search. michael@407: * michael@407: - * This file contains 210 fixup descriptions. michael@407: + * This file contains 211 fixup descriptions. michael@407: * michael@407: * See README for more information. michael@407: * michael@407: @@ -6969,6 +6969,43 @@ michael@407: michael@407: /* * * * * * * * * * * * * * * * * * * * * * * * * * michael@407: * michael@407: + * Description of Solaris_Posix_Spawn_Restrict fix michael@407: + */ michael@407: +tSCC zSolaris_Posix_Spawn_RestrictName[] = michael@407: + "solaris_posix_spawn_restrict"; michael@407: + michael@407: +/* michael@407: + * File name selection pattern michael@407: + */ michael@407: +tSCC zSolaris_Posix_Spawn_RestrictList[] = michael@407: + "spawn.h\0"; michael@407: +/* michael@407: + * Machine/OS name selection pattern michael@407: + */ michael@407: +tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = { michael@407: + "*-*-solaris2*", michael@407: + (const char*)NULL }; michael@407: + michael@407: +/* michael@407: + * content selection pattern - do fix if pattern found michael@407: + */ michael@407: +tSCC zSolaris_Posix_Spawn_RestrictSelect0[] = michael@407: + "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; michael@407: + michael@407: +#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1 michael@407: +static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = { michael@407: + { TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, }; michael@407: + michael@407: +/* michael@407: + * Fix Command Arguments for Solaris_Posix_Spawn_Restrict michael@407: + */ michael@407: +static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = { michael@407: + "format", michael@407: + "%1*_RESTRICT_KYWD %2%3", michael@407: + (char*)NULL }; michael@407: + michael@407: +/* * * * * * * * * * * * * * * * * * * * * * * * * * michael@407: + * michael@407: * Description of Solaris_Stdio_Tag fix michael@407: */ michael@407: tSCC zSolaris_Stdio_TagName[] = michael@407: @@ -8552,9 +8589,9 @@ michael@407: * michael@407: * List of all fixes michael@407: */ michael@407: -#define REGEX_COUNT 249 michael@407: +#define REGEX_COUNT 250 michael@407: #define MACH_LIST_SIZE_LIMIT 181 michael@407: -#define FIX_COUNT 210 michael@407: +#define FIX_COUNT 211 michael@407: michael@407: /* michael@407: * Enumerate the fixes michael@407: @@ -8731,6 +8768,7 @@ michael@407: SOLARIS_INT_LIMITS_2_FIXIDX, michael@407: SOLARIS_INT_LIMITS_3_FIXIDX, michael@407: SOLARIS_INT_TYPES_FIXIDX, michael@407: + SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX, michael@407: SOLARIS_STDIO_TAG_FIXIDX, michael@407: SOLARIS_SYS_VA_LIST_FIXIDX, michael@407: STATSSWTCH_FIXIDX, michael@407: @@ -9628,6 +9666,11 @@ michael@407: SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, michael@407: aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 }, michael@407: michael@407: + { zSolaris_Posix_Spawn_RestrictName, zSolaris_Posix_Spawn_RestrictList, michael@407: + apzSolaris_Posix_Spawn_RestrictMachs, michael@407: + SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, michael@407: + aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 }, michael@407: + michael@407: { zSolaris_Stdio_TagName, zSolaris_Stdio_TagList, michael@407: apzSolaris_Stdio_TagMachs, michael@407: SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY, michael@407: Index: fixincludes/inclhack.def michael@407: diff -Nau fixincludes/inclhack.def.orig fixincludes/inclhack.def michael@407: --- fixincludes/inclhack.def.orig 2010-11-09 11:26:09.000000000 +0100 michael@407: +++ fixincludes/inclhack.def 2012-03-18 17:07:13.464117283 +0100 michael@407: @@ -3693,6 +3693,23 @@ michael@407: michael@407: michael@407: /* michael@407: + * Solaris 10+ uses char *const argv[_RESTRICT_KYWD] in the michael@407: + * posix_spawn declarations, which doesn't work with C++. michael@407: + */ michael@407: +fix = { michael@407: + hackname = solaris_posix_spawn_restrict; michael@407: + files = spawn.h; michael@407: + mach = '*-*-solaris2*'; michael@407: + c_fix = format; michael@407: + c_fix_arg = "%1*_RESTRICT_KYWD %2%3"; michael@407: + select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)"; michael@407: + test_text = michael@407: + "char *const argv[_RESTRICT_KYWD],\n" michael@407: + "char *const envp[_RESTRICT_KYWD]);"; michael@407: +}; michael@407: + michael@407: + michael@407: +/* michael@407: * Sun Solaris 8 has what appears to be some gross workaround for michael@407: * some old version of their c++ compiler. G++ doesn't want it michael@407: * either, but doesn't want to be tied to SunPRO version numbers. michael@407: Index: fixincludes/tests/base/spawn.h michael@407: diff -Nau fixincludes/tests/base/spawn.h.orig fixincludes/tests/base/spawn.h michael@407: --- fixincludes/tests/base/spawn.h.orig 1970-01-01 01:00:00.000000000 +0100 michael@407: +++ fixincludes/tests/base/spawn.h 2012-03-18 15:28:02.432219498 +0100 michael@407: @@ -0,0 +1,15 @@ michael@407: +/* DO NOT EDIT THIS FILE. michael@407: + michael@407: + It has been auto-edited by fixincludes from: michael@407: + michael@407: + "fixinc/tests/inc/spawn.h" michael@407: + michael@407: + This had to be done to correct non-standard usages in the michael@407: + original, manufacturer supplied header file. */ michael@407: + michael@407: + michael@407: + michael@407: +#if defined( SOLARIS_POSIX_SPAWN_RESTRICT_CHECK ) michael@407: +char *const *_RESTRICT_KYWD argv, michael@407: +char *const *_RESTRICT_KYWD envp); michael@407: +#endif /* SOLARIS_POSIX_SPAWN_RESTRICT_CHECK */