* fixinc/inclhack.def (alpha_pthread_gcc): New fix.
authorro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Oct 2003 11:46:47 +0000 (11:46 +0000)
committerro <ro@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 14 Oct 2003 11:46:47 +0000 (11:46 +0000)
* fixinc/fixincl.x: Regenerate.
* fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New
testcase.
Fixes PR bootstrap/9330.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72465 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def
gcc/fixinc/tests/base/pthread.h

index 84a2355..a3da592 100644 (file)
@@ -1,3 +1,11 @@
+2003-10-14  Rainer Orth  <ro@TechFak.Uni-Bielefeld.DE>
+
+       * fixinc/inclhack.def (alpha_pthread_gcc): New fix.
+       * fixinc/fixincl.x: Regenerate.
+       * fixinc/tests/base/pthread.h [ALPHA_PTHREAD_GCC_CHECK]: New
+       testcase. 
+       Fixes PR bootstrap/9330.
+
 2003-10-13  Eric Christopher  <echristo@redhat.com>
 
        * config/frv/frv.c (frv_adjust_field_align): Redo check for
index a30a384..19f9880 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  Monday October  6, 2003 at 09:28:53 PM MEST
+ * It has been AutoGen-ed  Tuesday October 14, 2003 at 02:19:40 AM MEST
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT CVS-MERGE THIS FILE, EITHER Mon Oct  6 21:28:53 MEST 2003
+/* DO NOT CVS-MERGE THIS FILE, EITHER Tue Oct 14 02:19:40 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 158 fixup descriptions.
+ * This file contains 159 fixup descriptions.
  *
  * See README for more information.
  *
@@ -900,6 +900,46 @@ static const char* apzAlpha_PthreadPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Alpha_Pthread_Gcc fix
+ */
+tSCC zAlpha_Pthread_GccName[] =
+     "alpha_pthread_gcc";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zAlpha_Pthread_GccList[] =
+  "|pthread.h|";
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzAlpha_Pthread_GccMachs[] = {
+        "alpha*-dec-osf*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zAlpha_Pthread_GccSelect0[] =
+       "#else\n\
+# error <pthread.h>: unrecognized compiler.";
+
+#define    ALPHA_PTHREAD_GCC_TEST_CT  1
+static tTestDesc aAlpha_Pthread_GccTests[] = {
+  { TT_EGREP,    zAlpha_Pthread_GccSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Alpha_Pthread_Gcc
+ */
+static const char* apzAlpha_Pthread_GccPatch[] = {
+    "format",
+    "#elif defined (__GNUC__)\n\
+# define _PTHREAD_ENV_GCC\n\
+%0",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Alpha_Sbrk fix
  */
 tSCC zAlpha_SbrkName[] =
@@ -6269,9 +6309,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          178
+#define REGEX_COUNT          179
 #define MACH_LIST_SIZE_LIMIT 261
-#define FIX_COUNT            158
+#define FIX_COUNT            159
 
 /*
  *  Enumerate the fixes
@@ -6296,6 +6336,7 @@ typedef enum {
     ALPHA_GETOPT_FIXIDX,
     ALPHA_PARENS_FIXIDX,
     ALPHA_PTHREAD_FIXIDX,
+    ALPHA_PTHREAD_GCC_FIXIDX,
     ALPHA_SBRK_FIXIDX,
     AVOID_BOOL_DEFINE_FIXIDX,
     AVOID_BOOL_TYPE_FIXIDX,
@@ -6533,6 +6574,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      ALPHA_PTHREAD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aAlpha_PthreadTests,   apzAlpha_PthreadPatch, 0 },
 
+  {  zAlpha_Pthread_GccName,    zAlpha_Pthread_GccList,
+     apzAlpha_Pthread_GccMachs,
+     ALPHA_PTHREAD_GCC_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aAlpha_Pthread_GccTests,   apzAlpha_Pthread_GccPatch, 0 },
+
   {  zAlpha_SbrkName,    zAlpha_SbrkList,
      apzAlpha_SbrkMachs,
      ALPHA_SBRK_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index 636ac0f..2d0239b 100644 (file)
@@ -599,6 +599,27 @@ fix = {
 
 
 /*
+ *  Recognize GCC in Tru64 UNIX V5.1B <pthread.h>.
+ */
+fix = {
+    hackname  = alpha_pthread_gcc;
+    files     = pthread.h;
+    select    = "#else\n# error <pthread.h>: unrecognized compiler.";
+
+    mach      = "alpha*-dec-osf*";
+    c_fix     = format;
+    c_fix_arg = "#elif defined (__GNUC__)\n"
+               "# define _PTHREAD_ENV_GCC\n"
+               "%0";
+
+    test_text = "# define _PTHREAD_ENV_INTELC\n"
+               "#else\n"
+               "# error <pthread.h>: unrecognized compiler.\n"
+               "#endif";
+};
+
+
+/*
  *  Fix return value of sbrk in unistd.h on Alpha OSF/1 V2.0
  *  And OpenBSD.
  */
index 95ad2d5..bd10f5a 100644 (file)
 #endif  /* ALPHA_PTHREAD_CHECK */
 
 
+#if defined( ALPHA_PTHREAD_GCC_CHECK )
+# define _PTHREAD_ENV_INTELC
+#elif defined (__GNUC__)
+# define _PTHREAD_ENV_GCC
+#else
+# error <pthread.h>: unrecognized compiler.
+#endif
+#endif  /* ALPHA_PTHREAD_GCC_CHECK */
+
+
 #if defined( PTHREAD_PAGE_SIZE_CHECK )
 extern int __page_size;
 #endif  /* PTHREAD_PAGE_SIZE_CHECK */