diff options
author | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-21 16:25:07 +0000 |
---|---|---|
committer | sayle <sayle@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-11-21 16:25:07 +0000 |
commit | 31e7bff5ec101a6ccd06a1147912e64884d9c9af (patch) | |
tree | ce42d87a3f2eded136a49700d47eeba7e3f01591 /fixincludes | |
parent | 8824bd284e96c646d1933cd45bad0103a73eea0d (diff) | |
download | gcc-31e7bff5ec101a6ccd06a1147912e64884d9c9af.tar.gz |
* inclhack.def (alpha_pthread_init): New fix.
* fixincl.x: Regenerate.
* tests/base/pthread.h: Update for new test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@90981 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'fixincludes')
-rw-r--r-- | fixincludes/ChangeLog | 7 | ||||
-rw-r--r-- | fixincludes/fixincl.x | 57 | ||||
-rw-r--r-- | fixincludes/inclhack.def | 44 | ||||
-rw-r--r-- | fixincludes/tests/base/pthread.h | 21 |
4 files changed, 124 insertions, 5 deletions
diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index 9794c668f7b..ace5d2a75e6 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,10 @@ +2004-11-20 Roger Sayle <roger@eyesopen.com> + Bruce Korb <bkorb@gnu.org> + + * inclhack.def (alpha_pthread_init): New fix. + * fixincl.x: Regenerate. + * tests/base/pthread.h: Update for new test. + 2004-11-15 Bruce Korb <bkorb@gnu.org> * fixincl.c(fix_with_system): correct misuse of variables and diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 3700290c2c0..ff772117d1e 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Saturday November 13, 2004 at 08:30:08 PM UTC + * It has been AutoGen-ed Sunday November 21, 2004 at 09:09:46 AM MST * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Sat Nov 13 20:30:09 UTC 2004 +/* DO NOT CVS-MERGE THIS FILE, EITHER Sun Nov 21 09:09:46 MST 2004 * * 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 176 fixup descriptions. + * This file contains 177 fixup descriptions. * * See README for more information. * @@ -1085,6 +1085,47 @@ static const char* apzAlpha_Pthread_GccPatch[] = { /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Alpha_Pthread_Init fix + */ +tSCC zAlpha_Pthread_InitName[] = + "alpha_pthread_init"; + +/* + * File name selection pattern + */ +tSCC zAlpha_Pthread_InitList[] = + "|pthread.h|"; +/* + * Machine/OS name selection pattern + */ +tSCC* apzAlpha_Pthread_InitMachs[] = { + "alpha*-dec-osf*", + (const char*)NULL }; + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zAlpha_Pthread_InitSelect0[] = + " \\* @\\(#\\)\\$RCSfile: pthread\\.h,v \\$ \\$Revision: 1\\.1\\.33\\.21 \\$ \\(DEC\\) \\$Date: 2000/08/15 15:30:13 \\$"; + +#define ALPHA_PTHREAD_INIT_TEST_CT 1 +static tTestDesc aAlpha_Pthread_InitTests[] = { + { TT_EGREP, zAlpha_Pthread_InitSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Alpha_Pthread_Init + */ +static const char* apzAlpha_Pthread_InitPatch[] = { "sed", + "-e", "s@MVALID\\(.*\\)A}@MVALID\\1A, 0, 0, 0, 0, 0, 0 }@\n\ +s@MVALID\\(.*\\)_}@MVALID\\1_, 0, 0, 0, 0 }@\n\ +s@CVALID\\(.*\\)A}@CVALID\\1A, 0, 0, 0, 0 }@\n\ +s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n\ +s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n\ +s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Alpha_Sbrk fix */ tSCC zAlpha_SbrkName[] = @@ -7031,9 +7072,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 205 +#define REGEX_COUNT 206 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 176 +#define FIX_COUNT 177 /* * Enumerate the fixes @@ -7063,6 +7104,7 @@ typedef enum { ALPHA_PARENS_FIXIDX, ALPHA_PTHREAD_FIXIDX, ALPHA_PTHREAD_GCC_FIXIDX, + ALPHA_PTHREAD_INIT_FIXIDX, ALPHA_SBRK_FIXIDX, ALPHA_WCHAR_FIXIDX, AVOID_BOOL_DEFINE_FIXIDX, @@ -7338,6 +7380,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ALPHA_PTHREAD_GCC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, aAlpha_Pthread_GccTests, apzAlpha_Pthread_GccPatch, 0 }, + { zAlpha_Pthread_InitName, zAlpha_Pthread_InitList, + apzAlpha_Pthread_InitMachs, + ALPHA_PTHREAD_INIT_TEST_CT, FD_MACH_ONLY, + aAlpha_Pthread_InitTests, apzAlpha_Pthread_InitPatch, 0 }, + { zAlpha_SbrkName, zAlpha_SbrkList, apzAlpha_SbrkMachs, ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 828ee06eca6..37f23117283 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -705,6 +705,50 @@ fix = { "#endif"; }; +/* + * Compaq Tru64 v5.1 defines all of its PTHREAD_*_INITIALIZER macros + * incorrectly, specifying less fields in the initializers than are + * defined in the corresponding structure types. Use of these macros + * in user code results in spurious warnings. + */ +fix = { + hackname = alpha_pthread_init; + files = pthread.h; + select = ' \* @\(#\)\$' 'RCSfile: pthread\.h,v \$' + ' \$' 'Revision: 1\.1\.33\.21 \$ \(DEC\)' + ' \$' 'Date: 2000/08/15 15:30:13 \$'; + mach = "alpha*-dec-osf*"; + sed = "s@MVALID\\(.*\\)A}@MVALID\\1A, 0, 0, 0, 0, 0, 0 }@\n" + "s@MVALID\\(.*\\)_}@MVALID\\1_, 0, 0, 0, 0 }@\n" + "s@CVALID\\(.*\\)A}@CVALID\\1A, 0, 0, 0, 0 }@\n" + "s@CVALID\\(.*\\)_}@CVALID\\1_, 0, 0 }@\n" + "s@WVALID\\(.*\\)A}@WVALID\\1A, 0, 0, 0, 0, 0, 0, 0, 0, 0 }@\n" + "s@WVALID\\(.*\\)_}@WVALID\\1_, 0, 0, 0, 0, 0, 0, 0 }@\n"; + test_text = "/*\n" + " * @(#)\\$" "RCSfile: pthread.h,v \\$ \\$" + "Revision: 1.1.33.21 \\$ (DEC) \\$" + "Date: 2000/08/15 15:30:13 \\$\n" + " */\n" +"#ifndef _PTHREAD_NOMETER_STATIC\n" +"# define PTHREAD_MUTEX_INITIALIZER \\\n" +" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n" +"# define PTHREAD_COND_INITIALIZER \\\n" +" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA}\n" +"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n" +" {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n" +"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n" +" {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n" +"#else\n" +"# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA}\n" +"# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) \\\n" +" {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_}\n" +"# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) \\\n" +" {0, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_}\n" +"#endif\n\n" +"#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA}\n" +"#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) \\\n" +" {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_}\n"; +}; /* * Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0 diff --git a/fixincludes/tests/base/pthread.h b/fixincludes/tests/base/pthread.h index 385c055ec83..735c0ef7ffd 100644 --- a/fixincludes/tests/base/pthread.h +++ b/fixincludes/tests/base/pthread.h @@ -35,6 +35,27 @@ #endif /* ALPHA_PTHREAD_GCC_CHECK */ +#if defined( ALPHA_PTHREAD_INIT_CHECK ) +/* + * @(#)$RCSfile: pthread.h,v $ $Revision: 1.1.33.21 $ (DEC) $Date: 2000/08/15 15:30:13 $ + */ +#ifndef _PTHREAD_NOMETER_STATIC +# define PTHREAD_MUTEX_INITIALIZER {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 } +# define PTHREAD_COND_INITIALIZER {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, 0, 0, 0, 0 } +# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_MSTATE_CONFIG, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } +# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_CSTATE_SLOW, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } +#else +# define PTHREAD_MUTEX_INITIALIZER {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, 0, 0, 0, 0, 0, 0 } +# define PTHREAD_MUTEX_INITWITHNAME_NP(_n_,_a_) {0, _PTHREAD_MVALID | _PTHREAD_MVF_STA, _n_, _a_, 0, 0, 0, 0 } +# define PTHREAD_COND_INITWITHNAME_NP(_n_,_a_) {{{0},0}, _PTHREAD_CVALID | _PTHREAD_CVF_STA, _n_, _a_, 0, 0 } +#endif + +#define PTHREAD_RWLOCK_INITIALIZER {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, 0, 0, 0, 0, 0, 0, 0, 0, 0 } +#define PTHREAD_RWLOCK_INITWITHNAME_NP(_n_,_a_) {_PTHREAD_RWVALID | _PTHREAD_RWVF_STA, _n_, _a_, 0, 0, 0, 0, 0, 0, 0 } + +#endif /* ALPHA_PTHREAD_INIT_CHECK */ + + #if defined( PTHREAD_PAGE_SIZE_CHECK ) extern int __page_size; #endif /* PTHREAD_PAGE_SIZE_CHECK */ |