aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc
diff options
context:
space:
mode:
authorRainer Orth <ro@TechFak.Uni-Bielefeld.DE>2003-07-31 12:01:07 +0000
committerRainer Orth <ro@gcc.gnu.org>2003-07-31 12:01:07 +0000
commit2a4e8ebc137e8a04d1d6b66f93a93ae215acf33a (patch)
tree9da070fa50d61c24f4bb30ee44be274f1103d7fc /gcc/fixinc
parent620a329bbbaec71ba345a5c015983538fff18818 (diff)
downloadgcc-2a4e8ebc137e8a04d1d6b66f93a93ae215acf33a.zip
gcc-2a4e8ebc137e8a04d1d6b66f93a93ae215acf33a.tar.gz
gcc-2a4e8ebc137e8a04d1d6b66f93a93ae215acf33a.tar.bz2
re PR bootstrap/9330 ([alpha-osf]small alphaev56-dec-osf5.1 --enable-threads=posix problem)
* config.gcc (alpha*-dec-osf[45]*): Enable POSIX thread support by default. * gthr-posix.c: New file. * gthr-posix.h: Define _REENTRANT if missing. Make _LIBOBJC #pragma weak visible with _LIBOBJC_WEAK. * config/alpha/t-osf4 (SHLIB_LINK): Hide dummy functions provided by gthr-posix.o. * config/alpha/t-osf-pthread: New file. * fixinc/inclhack.def (alpha_pthread): New fix. * fixinc/fixincl.x: Regenerate. * fixinc/tests/base/pthread.h [ALPHA_PTHREAD_CHECK]: New testcase. * doc/install.texi (alpha*-dec-osf*): Remove --enable-threads warning. Fixes PR bootstrap/9330. From-SVN: r69998
Diffstat (limited to 'gcc/fixinc')
-rw-r--r--gcc/fixinc/fixincl.x55
-rw-r--r--gcc/fixinc/inclhack.def19
-rw-r--r--gcc/fixinc/tests/base/pthread.h7
3 files changed, 76 insertions, 5 deletions
diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x
index c25527b..d08f86c 100644
--- a/gcc/fixinc/fixincl.x
+++ b/gcc/fixinc/fixincl.x
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
- * It has been AutoGen-ed Thursday July 17, 2003 at 10:34:33 AM PDT
+ * It has been AutoGen-ed Tuesday July 29, 2003 at 08:15:05 PM MEST
* From the definitions inclhack.def
* and the template file fixincl
*/
-/* DO NOT CVS-MERGE THIS FILE, EITHER Thu Jul 17 10:34:33 PDT 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Jul 29 20:15:06 MEST 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 154 fixup descriptions.
+ * This file contains 155 fixup descriptions.
*
* See README for more information.
*
@@ -859,6 +859,45 @@ static const char* apzAlpha_ParensPatch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * Description of Alpha_Pthread fix
+ */
+tSCC zAlpha_PthreadName[] =
+ "alpha_pthread";
+
+/*
+ * File name selection pattern
+ */
+tSCC zAlpha_PthreadList[] =
+ "|pthread.h|";
+/*
+ * Machine/OS name selection pattern
+ */
+tSCC* apzAlpha_PthreadMachs[] = {
+ "alpha*-dec-osf*",
+ (const char*)NULL };
+
+/*
+ * content selection pattern - do fix if pattern found
+ */
+tSCC zAlpha_PthreadSelect0[] =
+ "(#[ \t]*if defined \\(_PTHREAD_ENV_DECC\\) || defined \\(_PTHREAD_ENV_EPCC\\))\n\
+(#[ \t]*define _PTHREAD_USE_PTDNAM_)";
+
+#define ALPHA_PTHREAD_TEST_CT 1
+static tTestDesc aAlpha_PthreadTests[] = {
+ { TT_EGREP, zAlpha_PthreadSelect0, (regex_t*)NULL }, };
+
+/*
+ * Fix Command Arguments for Alpha_Pthread
+ */
+static const char* apzAlpha_PthreadPatch[] = {
+ "format",
+ "%1 || defined (__PRAGMA_EXTERN_PREFIX)\n\
+%2",
+ (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
* Description of Alpha_Sbrk fix
*/
tSCC zAlpha_SbrkName[] =
@@ -6109,9 +6148,9 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
-#define REGEX_COUNT 173
+#define REGEX_COUNT 174
#define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT 154
+#define FIX_COUNT 155
/*
* Enumerate the fixes
@@ -6135,6 +6174,7 @@ typedef enum {
ALPHA_ASSERT_FIXIDX,
ALPHA_GETOPT_FIXIDX,
ALPHA_PARENS_FIXIDX,
+ ALPHA_PTHREAD_FIXIDX,
ALPHA_SBRK_FIXIDX,
AVOID_BOOL_DEFINE_FIXIDX,
AVOID_BOOL_TYPE_FIXIDX,
@@ -6364,6 +6404,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ALPHA_PARENS_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aAlpha_ParensTests, apzAlpha_ParensPatch, 0 },
+ { zAlpha_PthreadName, zAlpha_PthreadList,
+ apzAlpha_PthreadMachs,
+ ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+ aAlpha_PthreadTests, apzAlpha_PthreadPatch, 0 },
+
{ zAlpha_SbrkName, zAlpha_SbrkList,
apzAlpha_SbrkMachs,
ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 7fd6f45..b593d83 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -578,6 +578,25 @@ fix = {
/*
+ * Obey __PRAGMA_EXTERN_PREFIX for Tru64 UNIX <pthread.h>.
+ */
+fix = {
+ hackname = alpha_pthread;
+ files = pthread.h;
+ select = "(#[ \t]*if defined \\(_PTHREAD_ENV_DECC\\) || defined \\(_PTHREAD_ENV_EPCC\\))\n"
+ "(#[ \t]*define _PTHREAD_USE_PTDNAM_)";
+
+ mach = "alpha*-dec-osf*";
+ c_fix = format;
+ c_fix_arg = "%1 || defined (__PRAGMA_EXTERN_PREFIX)\n%2";
+
+ test_text = "# if defined (_PTHREAD_ENV_DECC) || defined (_PTHREAD_ENV_EPCC)\n"
+ "# define _PTHREAD_USE_PTDNAM_\n"
+ "# endif";
+};
+
+
+/*
* Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
* And OpenBSD.
*/
diff --git a/gcc/fixinc/tests/base/pthread.h b/gcc/fixinc/tests/base/pthread.h
index ec7ff35..95ad2d5 100644
--- a/gcc/fixinc/tests/base/pthread.h
+++ b/gcc/fixinc/tests/base/pthread.h
@@ -15,6 +15,13 @@
#endif /* AIX_PTHREAD_CHECK */
+#if defined( ALPHA_PTHREAD_CHECK )
+# if defined (_PTHREAD_ENV_DECC) || defined (_PTHREAD_ENV_EPCC) || defined (__PRAGMA_EXTERN_PREFIX)
+# define _PTHREAD_USE_PTDNAM_
+# endif
+#endif /* ALPHA_PTHREAD_CHECK */
+
+
#if defined( PTHREAD_PAGE_SIZE_CHECK )
extern int __page_size;
#endif /* PTHREAD_PAGE_SIZE_CHECK */