OSDN Git Service

Keep HP-UX headers from defining __size_t and leaving size_t undefined.
authorkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Sep 2001 02:13:41 +0000 (02:13 +0000)
committerkorbb <korbb@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 13 Sep 2001 02:13:41 +0000 (02:13 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45572 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/fixinc/fixincl.x
gcc/fixinc/inclhack.def

index c1f156e..cab4006 100644 (file)
@@ -1,3 +1,8 @@
+2001-09-12  Josh Martin  <josh.martin@abq.sc.philips.com>
+
+       * fixinc/inclhack.def(hpux11_size_t): Keep HP-UX headers from
+       defining __size_t and leaving size_t undefined.
+       
 2001-09-12  Diego Novillo  <dnovillo@redhat.com>
 
        * basic-block.h (expunge_block): Declare.
 2001-09-12  Diego Novillo  <dnovillo@redhat.com>
 
        * basic-block.h (expunge_block): Declare.
index 79b3e7e..32e8e71 100644 (file)
@@ -5,7 +5,7 @@
  * files which are fixed to work correctly with ANSI C and placed in a
  * directory that GNU C will search.
  *
  * files which are fixed to work correctly with ANSI C and placed in a
  * directory that GNU C will search.
  *
- * This file contains 144 fixup descriptions.
+ * This file contains 145 fixup descriptions.
  *
  * See README for more information.
  *
  *
  * See README for more information.
  *
@@ -2068,6 +2068,43 @@ static const char* apzHpux11_FabsfPatch[] = {
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
 
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
+ *  Description of Hpux11_Size_T fix
+ */
+tSCC zHpux11_Size_TName[] =
+     "hpux11_size_t";
+
+/*
+ *  File name selection pattern
+ */
+#define zHpux11_Size_TList (char*)NULL
+/*
+ *  Machine/OS name selection pattern
+ */
+tSCC* apzHpux11_Size_TMachs[] = {
+        "*-hp-hpux*",
+        (const char*)NULL };
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zHpux11_Size_TSelect0[] =
+       "^#define __size_t size_t";
+
+#define    HPUX11_SIZE_T_TEST_CT  1
+static tTestDesc aHpux11_Size_TTests[] = {
+  { TT_EGREP,    zHpux11_Size_TSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Hpux11_Size_T
+ */
+static const char* apzHpux11_Size_TPatch[] = {
+    "format",
+    "_hpux_size_t",
+    "__size_t",
+    (char*)NULL };
+
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
  *  Description of Hpux11_Uint32_C fix
  */
 tSCC zHpux11_Uint32_CName[] =
  *  Description of Hpux11_Uint32_C fix
  */
 tSCC zHpux11_Uint32_CName[] =
@@ -5614,9 +5651,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          151
+#define REGEX_COUNT          152
 #define MACH_LIST_SIZE_LIMIT 279
 #define MACH_LIST_SIZE_LIMIT 279
-#define FIX_COUNT            144
+#define FIX_COUNT            145
 
 /*
  *  Enumerate the fixes
 
 /*
  *  Enumerate the fixes
@@ -5673,6 +5710,7 @@ typedef enum {
     HPUX10_CPP_POW_INLINE_FIXIDX,
     HPUX11_CPP_POW_INLINE_FIXIDX,
     HPUX11_FABSF_FIXIDX,
     HPUX10_CPP_POW_INLINE_FIXIDX,
     HPUX11_CPP_POW_INLINE_FIXIDX,
     HPUX11_FABSF_FIXIDX,
+    HPUX11_SIZE_T_FIXIDX,
     HPUX11_UINT32_C_FIXIDX,
     HPUX11_VSNPRINTF_FIXIDX,
     HPUX8_BOGUS_INLINES_FIXIDX,
     HPUX11_UINT32_C_FIXIDX,
     HPUX11_VSNPRINTF_FIXIDX,
     HPUX8_BOGUS_INLINES_FIXIDX,
@@ -6024,6 +6062,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux11_FabsfTests,   apzHpux11_FabsfPatch, 0 },
 
      HPUX11_FABSF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
      aHpux11_FabsfTests,   apzHpux11_FabsfPatch, 0 },
 
+  {  zHpux11_Size_TName,    zHpux11_Size_TList,
+     apzHpux11_Size_TMachs,
+     HPUX11_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aHpux11_Size_TTests,   apzHpux11_Size_TPatch, 0 },
+
   {  zHpux11_Uint32_CName,    zHpux11_Uint32_CList,
      apzHpux11_Uint32_CMachs,
      HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
   {  zHpux11_Uint32_CName,    zHpux11_Uint32_CList,
      apzHpux11_Uint32_CMachs,
      HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index 40194e2..ef776e2 100644 (file)
@@ -1195,6 +1195,7 @@ fix = {
             "   }\n";
 };
 
             "   }\n";
 };
 
+
 /*
  *  Keep HP-UX 11 from stomping on C++ math namespace
  *  with defines for fabsf.
 /*
  *  Keep HP-UX 11 from stomping on C++ math namespace
  *  with defines for fabsf.
@@ -1216,6 +1217,25 @@ fix = {
 
 
 /*
 
 
 /*
+ * Prevent HP-UX 11 from defining __size_t and preventing size_t from
+ * being defined by having it define _hpux_size_t instead.
+ */
+fix = {
+    hackname  = hpux11_size_t;
+    mach      = "*-hp-hpux*";
+    select    = "^#define __size_t size_t";
+
+    c_fix     = format;
+    c_fix_arg = "_hpux_size_t";
+    c_fix_arg = "__size_t";
+
+    test_text =
+    "#define __size_t size_t\n"
+    "       extern int getpwuid_r( char *, __size_t, struct passwd **);\n";
+};
+
+
+/*
  * In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
  * of UINT32_C has undefined behavior according to ISO/ANSI:
  * the arguments to __CONCAT__ are not macro expanded before the
  * In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
  * of UINT32_C has undefined behavior according to ISO/ANSI:
  * the arguments to __CONCAT__ are not macro expanded before the