]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* inclhack.def (glibc_stdint): New fix.
authorjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 10:21:24 +0000 (10:21 +0000)
committerjsm28 <jsm28@138bc75d-0d04-0410-961f-82ee72b054a4>
Tue, 28 Apr 2009 10:21:24 +0000 (10:21 +0000)
* fixincl.x: Regenerate.
* tests/base/stdint.h: Update.

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

fixincludes/ChangeLog
fixincludes/fixincl.x
fixincludes/inclhack.def
fixincludes/tests/base/stdint.h

index d3a8641f565e3355a191906db7c39fa686dd593b..a6205bd5c29172b2a3dcec80138bdead57ef35fe 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-28  Joseph Myers  <joseph@codesourcery.com>
+
+       * inclhack.def (glibc_stdint): New fix.
+       * fixincl.x: Regenerate.
+       * tests/base/stdint.h: Update.
+
 2009-04-09  Jakub Jelinek  <jakub@redhat.com>
 
        * Makefile.in: Change copyright header to refer to version
index 505e2e875b7e306b012ec78f522d9ea523424282..652adeb0da7a802bc06ae213ef5ee74208bf1a50 100644 (file)
@@ -2,11 +2,11 @@
  * 
  * DO NOT EDIT THIS FILE   (fixincl.x)
  * 
- * It has been AutoGen-ed  Tuesday March 31, 2009 at 05:01:22 PM UTC
+ * It has been AutoGen-ed  Tuesday April 28, 2009 at 10:20:23 AM UTC
  * From the definitions    inclhack.def
  * and the template file   fixincl
  */
-/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Mar 31 17:01:22 UTC 2009
+/* DO NOT SVN-MERGE THIS FILE, EITHER Tue Apr 28 10:20:23 UTC 2009
  *
  * 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 180 fixup descriptions.
+ * This file contains 181 fixup descriptions.
  *
  * See README for more information.
  *
@@ -2217,6 +2217,44 @@ s/{ { 0, } }/{ { 0, 0, 0, 0, 0, 0 } }/\n\
     "-e", "/define[ \t]\\+PTHREAD_COND_INITIALIZER/s/{ { 0, } }/{ { 0, 0, 0, 0, 0, (void *) 0, 0, 0 } }/",
     (char*)NULL };
 
+/* * * * * * * * * * * * * * * * * * * * * * * * * *
+ *
+ *  Description of Glibc_Stdint fix
+ */
+tSCC zGlibc_StdintName[] =
+     "glibc_stdint";
+
+/*
+ *  File name selection pattern
+ */
+tSCC zGlibc_StdintList[] =
+  "stdint.h\0";
+/*
+ *  Machine/OS name selection pattern
+ */
+#define apzGlibc_StdintMachs (const char**)NULL
+
+/*
+ *  content selection pattern - do fix if pattern found
+ */
+tSCC zGlibc_StdintSelect0[] =
+       "GNU C Library";
+
+#define    GLIBC_STDINT_TEST_CT  1
+static tTestDesc aGlibc_StdintTests[] = {
+  { TT_EGREP,    zGlibc_StdintSelect0, (regex_t*)NULL }, };
+
+/*
+ *  Fix Command Arguments for Glibc_Stdint
+ */
+static const char* apzGlibc_StdintPatch[] = {
+    "format",
+    "# define UINT8_C(c)\tc\n\
+# define UINT16_C(c)\tc",
+    "# define UINT8_C\\(c\\)\tc ## U\n\
+# define UINT16_C\\(c\\)\tc ## U",
+    (char*)NULL };
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * *
  *
  *  Description of Glibc_Tgmath fix
@@ -7325,9 +7363,9 @@ static const char* apzX11_SprintfPatch[] = {
  *
  *  List of all fixes
  */
-#define REGEX_COUNT          225
+#define REGEX_COUNT          226
 #define MACH_LIST_SIZE_LIMIT 181
-#define FIX_COUNT            180
+#define FIX_COUNT            181
 
 /*
  *  Enumerate the fixes
@@ -7386,6 +7424,7 @@ typedef enum {
     GLIBC_C99_INLINE_3_FIXIDX,
     GLIBC_C99_INLINE_4_FIXIDX,
     GLIBC_MUTEX_INIT_FIXIDX,
+    GLIBC_STDINT_FIXIDX,
     GLIBC_TGMATH_FIXIDX,
     GNU_TYPES_FIXIDX,
     HP_INLINE_FIXIDX,
@@ -7781,6 +7820,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
      GLIBC_MUTEX_INIT_TEST_CT, FD_MACH_ONLY,
      aGlibc_Mutex_InitTests,   apzGlibc_Mutex_InitPatch, 0 },
 
+  {  zGlibc_StdintName,    zGlibc_StdintList,
+     apzGlibc_StdintMachs,
+     GLIBC_STDINT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
+     aGlibc_StdintTests,   apzGlibc_StdintPatch, 0 },
+
   {  zGlibc_TgmathName,    zGlibc_TgmathList,
      apzGlibc_TgmathMachs,
      GLIBC_TGMATH_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
index e1d413cc8db6f02159739efbb03ca5d7fa570148..0b7c3b094fa9c6f3957ab2a78835ddfcc8e242b4 100644 (file)
@@ -1265,6 +1265,20 @@ fix = {
 };
 
 
+/* glibc versions before 2.5 have a version of stdint.h that defines
+   UINT8_C and UINT16_C to produce unsigned constants, as do uClibc
+   versions with stdint.h based on those glibc versions.  */
+fix = {
+    hackname  = glibc_stdint;
+    files     = stdint.h;
+    select    = "GNU C Library";
+    c_fix     = format;
+    c_fix_arg = "# define UINT8_C(c)\tc\n# define UINT16_C(c)\tc";
+    c_fix_arg = "# define UINT8_C\\(c\\)\tc ## U\n# define UINT16_C\\(c\\)\tc ## U";
+    test_text = "/* This file is part of the GNU C Library.  */\n# define UINT8_C(c)\tc ## U\n# define UINT16_C(c)\tc ## U";
+};
+
+
 /* glibc's tgmath.h relies on an expression that is not an integer
    constant expression being treated as it was by GCC 4.4 and
    earlier.  */
index 9ca62aea785404eb1622e31fe6fc32f4c407ff58..30ba3adac886e4e3db5df6b36d8367cb3d98381c 100644 (file)
@@ -9,6 +9,13 @@
 
 
 
+#if defined( GLIBC_STDINT_CHECK )
+/* This file is part of the GNU C Library.  */
+# define UINT8_C(c)    c
+# define UINT16_C(c)   c
+#endif  /* GLIBC_STDINT_CHECK */
+
+
 #if defined( IRIX_STDINT_C99_CHECK )
 #if 0
 #error This header file is to be used only for c99 mode compilations