re PR target/29300 (FAIL: gcc.dg/pthread-init-[12].c (test for excess errors))
PR target/29300 * inclhack.def (hpux_pthread_initializers): New hack. * tests/base/sys/pthread.h: New file. * fixincl.x: Regenerate. From-SVN: r117537
This commit is contained in:
parent
32a126b2fb
commit
6c65aa402b
@ -1,3 +1,11 @@
|
||||
2006-10-07 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
|
||||
|
||||
PR target/29300
|
||||
* inclhack.def (hpux_pthread_initializers): New hack.
|
||||
* tests/base/sys/pthread.h: New file.
|
||||
|
||||
* fixincl.x: Regenerate.
|
||||
|
||||
2006-10-03 Uros Bizjak <uros@kss-loka.si>
|
||||
|
||||
* inclhack.def (glibc_mutex_init): Also fix
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Tuesday October 3, 2006 at 07:43:53 AM CEST
|
||||
* It has been AutoGen-ed Saturday October 7, 2006 at 12:32:06 PM EDT
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Oct 3 07:43:53 CEST 2006
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Oct 7 12:32:07 EDT 2006
|
||||
*
|
||||
* 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 200 fixup descriptions.
|
||||
* This file contains 201 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
@ -3079,6 +3079,46 @@ extern \"C\" {\n\
|
||||
#endif",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Hpux_Pthread_Initializers fix
|
||||
*/
|
||||
tSCC zHpux_Pthread_InitializersName[] =
|
||||
"hpux_pthread_initializers";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zHpux_Pthread_InitializersList[] =
|
||||
"|sys/pthread.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
tSCC* apzHpux_Pthread_InitializersMachs[] = {
|
||||
"*-hp-hpux11.[0-3]*",
|
||||
(const char*)NULL };
|
||||
#define HPUX_PTHREAD_INITIALIZERS_TEST_CT 0
|
||||
#define aHpux_Pthread_InitializersTests (tTestDesc*)NULL
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Hpux_Pthread_Initializers
|
||||
*/
|
||||
static const char* apzHpux_Pthread_InitializersPatch[] = { "sed",
|
||||
"-e", "s@^[ \t]*1, 1, 1, 1,[ \t]*\\\\@\t{ 1, 1, 1, 1 },\t\t\t\t\t\t\t\\\\@",
|
||||
"-e", "s@^[ \t]*1,[ \t]*\\\\@\t{ 1, 0 }@",
|
||||
"-e", "/^[ \t]*0$/d",
|
||||
"-e", "s@__PTHREAD_MUTEX_VALID, 0@{ __PTHREAD_MUTEX_VALID, 0 }@",
|
||||
"-e", "s@^[ \t]*0, 0, -1, 0,[ \t]*\\\\@\t{ 0, 0, -1, 0 },\t\t\t\t\t\t\\\\@",
|
||||
"-e", "s@0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\@{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@",
|
||||
"-e", "s@^[ \t]*__LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\@\t{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@",
|
||||
"-e", "s@^[ \t]*0, 0[ \t]*\\\\@\t{ 0, 0 }\t\t\t\t\t\t\t\\\\@",
|
||||
"-e", "s@__PTHREAD_COND_VALID, 0@{ __PTHREAD_COND_VALID, 0 }@",
|
||||
"-e", "s@__LWP_COND_VALID, 0,[ \t]*\\\\@{ __LWP_COND_VALID, 0 },\t\t\t\t\t\\\\@",
|
||||
"-e", "s@__PTHREAD_RWLOCK_VALID, 0@{ __PTHREAD_RWLOCK_VALID, 0 }@",
|
||||
"-e", "s@__LWP_RWLOCK_VALID, 0,[ \t]*\\\\@{ __LWP_RWLOCK_VALID, 0 },\t\t\t\t\t\\\\@",
|
||||
"-e", "s@^[ \t]*0, 0, 0, 0, 0, 0, 0[ \t]*\\\\@\t{ 0, 0, 0, 0, 0 }, { 0, 0}\t\t\t\t\t\\\\@",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Huge_Val_Hex fix
|
||||
@ -8145,7 +8185,7 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*/
|
||||
#define REGEX_COUNT 243
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 200
|
||||
#define FIX_COUNT 201
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
@ -8223,6 +8263,7 @@ typedef enum {
|
||||
HPUX_SYSTIME_FIXIDX,
|
||||
HPUX_SPU_INFO_FIXIDX,
|
||||
HPUX_EXTERN_ERRNO_FIXIDX,
|
||||
HPUX_PTHREAD_INITIALIZERS_FIXIDX,
|
||||
HUGE_VAL_HEX_FIXIDX,
|
||||
HUGE_VALF_HEX_FIXIDX,
|
||||
HUGE_VALL_HEX_FIXIDX,
|
||||
@ -8714,6 +8755,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
HPUX_EXTERN_ERRNO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aHpux_Extern_ErrnoTests, apzHpux_Extern_ErrnoPatch, 0 },
|
||||
|
||||
{ zHpux_Pthread_InitializersName, zHpux_Pthread_InitializersList,
|
||||
apzHpux_Pthread_InitializersMachs,
|
||||
HPUX_PTHREAD_INITIALIZERS_TEST_CT, FD_MACH_ONLY,
|
||||
aHpux_Pthread_InitializersTests, apzHpux_Pthread_InitializersPatch, 0 },
|
||||
|
||||
{ zHuge_Val_HexName, zHuge_Val_HexList,
|
||||
apzHuge_Val_HexMachs,
|
||||
HUGE_VAL_HEX_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
|
@ -1790,6 +1790,47 @@ fix = {
|
||||
test_text = " extern int errno;\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* Add missing braces to pthread initializer defines.
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux_pthread_initializers;
|
||||
mach = "*-hp-hpux11.[0-3]*";
|
||||
files = sys/pthread.h;
|
||||
sed = "s@^[ \t]*1, 1, 1, 1,[ \t]*\\\\"
|
||||
"@\t{ 1, 1, 1, 1 },\t\t\t\t\t\t\t\\\\@";
|
||||
sed = "s@^[ \t]*1,[ \t]*\\\\"
|
||||
"@\t{ 1, 0 }@";
|
||||
sed = "/^[ \t]*0$/d";
|
||||
sed = "s@__PTHREAD_MUTEX_VALID, 0"
|
||||
"@{ __PTHREAD_MUTEX_VALID, 0 }@";
|
||||
sed = "s@^[ \t]*0, 0, -1, 0,[ \t]*\\\\"
|
||||
"@\t{ 0, 0, -1, 0 },\t\t\t\t\t\t\\\\@";
|
||||
sed = "s@0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
|
||||
"@{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
|
||||
sed = "s@^[ \t]*__LWP_MTX_VALID, 0, 1, 1, 1, 1,[ \t]*\\\\"
|
||||
"@\t{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 },\t\t\t\\\\@";
|
||||
sed = "s@^[ \t]*0, 0[ \t]*\\\\"
|
||||
"@\t{ 0, 0 }\t\t\t\t\t\t\t\\\\@";
|
||||
sed = "s@__PTHREAD_COND_VALID, 0"
|
||||
"@{ __PTHREAD_COND_VALID, 0 }@";
|
||||
sed = "s@__LWP_COND_VALID, 0,[ \t]*\\\\"
|
||||
"@{ __LWP_COND_VALID, 0 },\t\t\t\t\t\\\\@";
|
||||
sed = "s@__PTHREAD_RWLOCK_VALID, 0"
|
||||
"@{ __PTHREAD_RWLOCK_VALID, 0 }@";
|
||||
sed = "s@__LWP_RWLOCK_VALID, 0,[ \t]*\\\\"
|
||||
"@{ __LWP_RWLOCK_VALID, 0 },\t\t\t\t\t\\\\@";
|
||||
sed = "s@^[ \t]*0, 0, 0, 0, 0, 0, 0[ \t]*\\\\"
|
||||
"@\t{ 0, 0, 0, 0, 0 }, { 0, 0}\t\t\t\t\t\\\\@";
|
||||
test_text = "#define PTHREAD_MUTEX_INITIALIZER {\t\t\t\t\t\\\\\n"
|
||||
"\t__PTHREAD_MUTEX_VALID, 0,\t\t\t\t\t\\\\\n"
|
||||
"\t(PTHREAD_MUTEX_DEFAULT | PTHREAD_PROCESS_PRIVATE),\t\t\\\\\n"
|
||||
"\t__SPNLCK_INITIALIZER,\t\t\t\t\t\t\\\\\n"
|
||||
"\t0, 0, -1, 0,\t\t\t\t\t\t\t\\\\\n"
|
||||
"\t0, __LWP_MTX_VALID, 0, 1, 1, 1, 1,\t\t\t\t\\\\\n"
|
||||
"\t0, 0\t\t\t\t\t\t\t\t\\\\\n"
|
||||
"}\n";
|
||||
};
|
||||
|
||||
/*
|
||||
* Fix glibc definition of HUGE_VAL in terms of hex floating point constant
|
||||
|
22
fixincludes/tests/base/sys/pthread.h
Normal file
22
fixincludes/tests/base/sys/pthread.h
Normal file
@ -0,0 +1,22 @@
|
||||
/* DO NOT EDIT THIS FILE.
|
||||
|
||||
It has been auto-edited by fixincludes from:
|
||||
|
||||
"fixinc/tests/inc/sys/pthread.h"
|
||||
|
||||
This had to be done to correct non-standard usages in the
|
||||
original, manufacturer supplied header file. */
|
||||
|
||||
|
||||
|
||||
#if defined( HPUX_PTHREAD_INITIALIZERS_CHECK )
|
||||
#define PTHREAD_MUTEX_INITIALIZER { \
|
||||
{ __PTHREAD_MUTEX_VALID, 0 }, \
|
||||
(PTHREAD_MUTEX_DEFAULT | PTHREAD_PROCESS_PRIVATE), \
|
||||
__SPNLCK_INITIALIZER, \
|
||||
{ 0, 0, -1, 0 }, \
|
||||
{ 0, __LWP_MTX_VALID }, { 0, 1, 1, 1, 1 }, \
|
||||
{ 0, 0 } \
|
||||
}
|
||||
|
||||
#endif /* HPUX_PTHREAD_INITIALIZERS_CHECK */
|
Loading…
Reference in New Issue
Block a user