OSDN Git Service

Keep HP-UX headers from defining __size_t and leaving size_t undefined.
[pf3gnuchains/gcc-fork.git] / gcc / fixinc / inclhack.def
index 40194e2..ef776e2 100644 (file)
@@ -1195,6 +1195,7 @@ fix = {
             "   }\n";
 };
 
+
 /*
  *  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