re PR c++/49347 (G++ rejects Solaris spawn.h use of __restrict)
PR c++/49347 * inclhack.def (solaris_posix_spawn_restrict): New fix. * fixincl.x: Regenerate. * tests/base/spawn.h: New test. From-SVN: r176758
This commit is contained in:
parent
f4da258f52
commit
9d7b212415
@ -1,3 +1,10 @@
|
|||||||
|
2011-07-25 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
|
||||||
|
|
||||||
|
PR c++/49347
|
||||||
|
* inclhack.def (solaris_posix_spawn_restrict): New fix.
|
||||||
|
* fixincl.x: Regenerate.
|
||||||
|
* tests/base/spawn.h: New test.
|
||||||
|
|
||||||
2011-06-08 Douglas B Rupp <rupp@gnat.com>
|
2011-06-08 Douglas B Rupp <rupp@gnat.com>
|
||||||
|
|
||||||
* configure.ac (AC_USE_SYSTEM_EXTENSIONS): Add.
|
* configure.ac (AC_USE_SYSTEM_EXTENSIONS): Add.
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
*
|
*
|
||||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||||
*
|
*
|
||||||
* It has been AutoGen-ed Sunday June 5, 2011 at 09:04:54 PM CDT
|
* It has been AutoGen-ed Saturday July 23, 2011 at 01:16:35 AM MEST
|
||||||
* From the definitions inclhack.def
|
* From the definitions inclhack.def
|
||||||
* and the template file fixincl
|
* and the template file fixincl
|
||||||
*/
|
*/
|
||||||
/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Jun 5 21:04:54 CDT 2011
|
/* DO NOT SVN-MERGE THIS FILE, EITHER Sat Jul 23 01:16:35 MEST 2011
|
||||||
*
|
*
|
||||||
* You must regenerate it. Use the ./genfixes script.
|
* You must regenerate it. Use the ./genfixes script.
|
||||||
*
|
*
|
||||||
@ -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 211 fixup descriptions.
|
* This file contains 212 fixup descriptions.
|
||||||
*
|
*
|
||||||
* See README for more information.
|
* See README for more information.
|
||||||
*
|
*
|
||||||
@ -7006,6 +7006,43 @@ static const char* apzSolaris_Int_TypesPatch[] = {
|
|||||||
"(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))",
|
"(defined(_STDC_C99) || !defined(_STRICT_STDC) || defined(__GNUC__))",
|
||||||
(char*)NULL };
|
(char*)NULL };
|
||||||
|
|
||||||
|
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
|
*
|
||||||
|
* Description of Solaris_Posix_Spawn_Restrict fix
|
||||||
|
*/
|
||||||
|
tSCC zSolaris_Posix_Spawn_RestrictName[] =
|
||||||
|
"solaris_posix_spawn_restrict";
|
||||||
|
|
||||||
|
/*
|
||||||
|
* File name selection pattern
|
||||||
|
*/
|
||||||
|
tSCC zSolaris_Posix_Spawn_RestrictList[] =
|
||||||
|
"spawn.h\0";
|
||||||
|
/*
|
||||||
|
* Machine/OS name selection pattern
|
||||||
|
*/
|
||||||
|
tSCC* apzSolaris_Posix_Spawn_RestrictMachs[] = {
|
||||||
|
"*-*-solaris2*",
|
||||||
|
(const char*)NULL };
|
||||||
|
|
||||||
|
/*
|
||||||
|
* content selection pattern - do fix if pattern found
|
||||||
|
*/
|
||||||
|
tSCC zSolaris_Posix_Spawn_RestrictSelect0[] =
|
||||||
|
"(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)";
|
||||||
|
|
||||||
|
#define SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT 1
|
||||||
|
static tTestDesc aSolaris_Posix_Spawn_RestrictTests[] = {
|
||||||
|
{ TT_EGREP, zSolaris_Posix_Spawn_RestrictSelect0, (regex_t*)NULL }, };
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fix Command Arguments for Solaris_Posix_Spawn_Restrict
|
||||||
|
*/
|
||||||
|
static const char* apzSolaris_Posix_Spawn_RestrictPatch[] = {
|
||||||
|
"format",
|
||||||
|
"%1*_RESTRICT_KYWD %2%3",
|
||||||
|
(char*)NULL };
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
*
|
*
|
||||||
* Description of Solaris_Stdio_Tag fix
|
* Description of Solaris_Stdio_Tag fix
|
||||||
@ -8591,9 +8628,9 @@ static const char* apzX11_SprintfPatch[] = {
|
|||||||
*
|
*
|
||||||
* List of all fixes
|
* List of all fixes
|
||||||
*/
|
*/
|
||||||
#define REGEX_COUNT 250
|
#define REGEX_COUNT 251
|
||||||
#define MACH_LIST_SIZE_LIMIT 181
|
#define MACH_LIST_SIZE_LIMIT 181
|
||||||
#define FIX_COUNT 211
|
#define FIX_COUNT 212
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Enumerate the fixes
|
* Enumerate the fixes
|
||||||
@ -8771,6 +8808,7 @@ typedef enum {
|
|||||||
SOLARIS_INT_LIMITS_2_FIXIDX,
|
SOLARIS_INT_LIMITS_2_FIXIDX,
|
||||||
SOLARIS_INT_LIMITS_3_FIXIDX,
|
SOLARIS_INT_LIMITS_3_FIXIDX,
|
||||||
SOLARIS_INT_TYPES_FIXIDX,
|
SOLARIS_INT_TYPES_FIXIDX,
|
||||||
|
SOLARIS_POSIX_SPAWN_RESTRICT_FIXIDX,
|
||||||
SOLARIS_STDIO_TAG_FIXIDX,
|
SOLARIS_STDIO_TAG_FIXIDX,
|
||||||
SOLARIS_SYS_VA_LIST_FIXIDX,
|
SOLARIS_SYS_VA_LIST_FIXIDX,
|
||||||
STATSSWTCH_FIXIDX,
|
STATSSWTCH_FIXIDX,
|
||||||
@ -9673,6 +9711,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
|||||||
SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
SOLARIS_INT_TYPES_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||||
aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 },
|
aSolaris_Int_TypesTests, apzSolaris_Int_TypesPatch, 0 },
|
||||||
|
|
||||||
|
{ zSolaris_Posix_Spawn_RestrictName, zSolaris_Posix_Spawn_RestrictList,
|
||||||
|
apzSolaris_Posix_Spawn_RestrictMachs,
|
||||||
|
SOLARIS_POSIX_SPAWN_RESTRICT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||||
|
aSolaris_Posix_Spawn_RestrictTests, apzSolaris_Posix_Spawn_RestrictPatch, 0 },
|
||||||
|
|
||||||
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
|
{ zSolaris_Stdio_TagName, zSolaris_Stdio_TagList,
|
||||||
apzSolaris_Stdio_TagMachs,
|
apzSolaris_Stdio_TagMachs,
|
||||||
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
|
SOLARIS_STDIO_TAG_TEST_CT, FD_MACH_ONLY,
|
||||||
|
@ -3705,6 +3705,23 @@ fix = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Solaris 10+ <spawn.h> uses char *const argv[_RESTRICT_KYWD] in the
|
||||||
|
* posix_spawn declarations, which doesn't work with C++.
|
||||||
|
*/
|
||||||
|
fix = {
|
||||||
|
hackname = solaris_posix_spawn_restrict;
|
||||||
|
files = spawn.h;
|
||||||
|
mach = '*-*-solaris2*';
|
||||||
|
c_fix = format;
|
||||||
|
c_fix_arg = "%1*_RESTRICT_KYWD %2%3";
|
||||||
|
select = "(.*[ \t]+)([a-z]+)\\[_RESTRICT_KYWD\\](.*)";
|
||||||
|
test_text =
|
||||||
|
"char *const argv[_RESTRICT_KYWD],\n"
|
||||||
|
"char *const envp[_RESTRICT_KYWD]);";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Sun Solaris 8 has what appears to be some gross workaround for
|
* Sun Solaris 8 has what appears to be some gross workaround for
|
||||||
* some old version of their c++ compiler. G++ doesn't want it
|
* some old version of their c++ compiler. G++ doesn't want it
|
||||||
|
15
fixincludes/tests/base/spawn.h
Normal file
15
fixincludes/tests/base/spawn.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
/* DO NOT EDIT THIS FILE.
|
||||||
|
|
||||||
|
It has been auto-edited by fixincludes from:
|
||||||
|
|
||||||
|
"fixinc/tests/inc/spawn.h"
|
||||||
|
|
||||||
|
This had to be done to correct non-standard usages in the
|
||||||
|
original, manufacturer supplied header file. */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#if defined( SOLARIS_POSIX_SPAWN_RESTRICT_CHECK )
|
||||||
|
char *const *_RESTRICT_KYWD argv,
|
||||||
|
char *const *_RESTRICT_KYWD envp);
|
||||||
|
#endif /* SOLARIS_POSIX_SPAWN_RESTRICT_CHECK */
|
Loading…
Reference in New Issue
Block a user