Commit c91e2eae by Hans-Peter Nilsson Committed by Hans-Peter Nilsson

inclhack.def: (glibc_c99_inline_1a): Re-add last change.

	* inclhack.def: (glibc_c99_inline_1a): Re-add last change.
	(glibc_c99_inline_3) <bypass>: Change from __STDC_VERSION__ to
	__extern_inline|__GNU_STDC_INLINE__.
	(glibc_c99_inline_4) <files>: Add wchar.h and */wchar.h.
	<bypass>: Change from __STDC_VERSION__ to
	__extern_inline|__GNU_STDC_INLINE__.
	<first c_fix_arg>: Change from #ifdef-wrapping the extern part to
	appending attribute-gnu_inline.
	<second c_fix_arg>: Remove.
	<test_text>: Remove __extern_inline line.
	* tests/base/features.h: Re-add.
	* tests/base/sys/sysmacros.h: Adjust.
	* fixincl.x: Regenerate.

From-SVN: r132092
parent 1a1640db
2008-02-04 Hans-Peter Nilsson <hp@axis.com>
* inclhack.def: (glibc_c99_inline_1a): Re-add last change.
(glibc_c99_inline_3) <bypass>: Change from __STDC_VERSION__ to
__extern_inline|__GNU_STDC_INLINE__.
(glibc_c99_inline_4) <files>: Add wchar.h and */wchar.h.
<bypass>: Change from __STDC_VERSION__ to
__extern_inline|__GNU_STDC_INLINE__.
<first c_fix_arg>: Change from #ifdef-wrapping the extern part to
appending attribute-gnu_inline.
<second c_fix_arg>: Remove.
<test_text>: Remove __extern_inline line.
* tests/base/features.h: Re-add.
* tests/base/sys/sysmacros.h: Adjust.
* fixincl.x: Regenerate.
2008-01-06 Hans-Peter Nilsson <hp@axis.com> 2008-01-06 Hans-Peter Nilsson <hp@axis.com>
Revert last change. Revert last change.
......
...@@ -2,11 +2,11 @@ ...@@ -2,11 +2,11 @@
* *
* DO NOT EDIT THIS FILE (fixincl.x) * DO NOT EDIT THIS FILE (fixincl.x)
* *
* It has been AutoGen-ed Sunday October 14, 2007 at 06:17:05 PM EDT * It has been AutoGen-ed Monday January 7, 2008 at 09:24:53 PM CET
* From the definitions inclhack.def * From the definitions inclhack.def
* and the template file fixincl * and the template file fixincl
*/ */
/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Oct 14 18:17:05 EDT 2007 /* DO NOT SVN-MERGE THIS FILE, EITHER Mon Jan 7 21:24:53 CET 2008
* *
* You must regenerate it. Use the ./genfixes script. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
* certain ANSI-incompatible system header files which are fixed to work * 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. * correctly with ANSI C and placed in a directory that GNU C will search.
* *
* This file contains 210 fixup descriptions. * This file contains 211 fixup descriptions.
* *
* See README for more information. * See README for more information.
* *
...@@ -2265,6 +2265,43 @@ static const char* apzGlibc_C99_Inline_1Patch[] = { ...@@ -2265,6 +2265,43 @@ static const char* apzGlibc_C99_Inline_1Patch[] = {
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Description of Glibc_C99_Inline_1a fix
*/
tSCC zGlibc_C99_Inline_1aName[] =
"glibc_c99_inline_1a";
/*
* File name selection pattern
*/
tSCC zGlibc_C99_Inline_1aList[] =
"features.h\0*/features.h\0";
/*
* Machine/OS name selection pattern
*/
#define apzGlibc_C99_Inline_1aMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_1aSelect0[] =
"(\\) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__)\n\
(#[ \t]*define[ \t]*__USE_EXTERN_INLINES[ \t]*1)";
#define GLIBC_C99_INLINE_1A_TEST_CT 1
static tTestDesc aGlibc_C99_Inline_1aTests[] = {
{ TT_EGREP, zGlibc_C99_Inline_1aSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Glibc_C99_Inline_1a
*/
static const char* apzGlibc_C99_Inline_1aPatch[] = {
"format",
"%1 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)\n\
%2",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Glibc_C99_Inline_2 fix * Description of Glibc_C99_Inline_2 fix
*/ */
tSCC zGlibc_C99_Inline_2Name[] = tSCC zGlibc_C99_Inline_2Name[] =
...@@ -2335,7 +2372,7 @@ tSCC zGlibc_C99_Inline_3Select0[] = ...@@ -2335,7 +2372,7 @@ tSCC zGlibc_C99_Inline_3Select0[] =
* content bypass pattern - skip fix if pattern found * content bypass pattern - skip fix if pattern found
*/ */
tSCC zGlibc_C99_Inline_3Bypass0[] = tSCC zGlibc_C99_Inline_3Bypass0[] =
"__STDC_VERSION__"; "__extern_inline|__GNU_STDC_INLINE__";
#define GLIBC_C99_INLINE_3_TEST_CT 2 #define GLIBC_C99_INLINE_3_TEST_CT 2
static tTestDesc aGlibc_C99_Inline_3Tests[] = { static tTestDesc aGlibc_C99_Inline_3Tests[] = {
...@@ -2362,7 +2399,7 @@ tSCC zGlibc_C99_Inline_4Name[] = ...@@ -2362,7 +2399,7 @@ tSCC zGlibc_C99_Inline_4Name[] =
* File name selection pattern * File name selection pattern
*/ */
tSCC zGlibc_C99_Inline_4List[] = tSCC zGlibc_C99_Inline_4List[] =
"sys/sysmacros.h\0*/sys/sysmacros.h\0"; "sys/sysmacros.h\0*/sys/sysmacros.h\0wchar.h\0*/wchar.h\0";
/* /*
* Machine/OS name selection pattern * Machine/OS name selection pattern
*/ */
...@@ -2372,13 +2409,13 @@ tSCC zGlibc_C99_Inline_4List[] = ...@@ -2372,13 +2409,13 @@ tSCC zGlibc_C99_Inline_4List[] =
* content selection pattern - do fix if pattern found * content selection pattern - do fix if pattern found
*/ */
tSCC zGlibc_C99_Inline_4Select0[] = tSCC zGlibc_C99_Inline_4Select0[] =
"extern __inline"; "(^| )extern __inline";
/* /*
* content bypass pattern - skip fix if pattern found * content bypass pattern - skip fix if pattern found
*/ */
tSCC zGlibc_C99_Inline_4Bypass0[] = tSCC zGlibc_C99_Inline_4Bypass0[] =
"__STDC_VERSION__"; "__extern_inline|__gnu_inline__";
#define GLIBC_C99_INLINE_4_TEST_CT 2 #define GLIBC_C99_INLINE_4_TEST_CT 2
static tTestDesc aGlibc_C99_Inline_4Tests[] = { static tTestDesc aGlibc_C99_Inline_4Tests[] = {
...@@ -2390,11 +2427,7 @@ static tTestDesc aGlibc_C99_Inline_4Tests[] = { ...@@ -2390,11 +2427,7 @@ static tTestDesc aGlibc_C99_Inline_4Tests[] = {
*/ */
static const char* apzGlibc_C99_Inline_4Patch[] = { static const char* apzGlibc_C99_Inline_4Patch[] = {
"format", "format",
"\n\ "%0 __attribute__ ((__gnu_inline__))",
#ifdef __GNUC_GNU_INLINE__\n\
extern\n\
#endif\n",
"(^| )extern ",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -8539,9 +8572,9 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -8539,9 +8572,9 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 253 #define REGEX_COUNT 254
#define MACH_LIST_SIZE_LIMIT 261 #define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 210 #define FIX_COUNT 211
/* /*
* Enumerate the fixes * Enumerate the fixes
...@@ -8599,6 +8632,7 @@ typedef enum { ...@@ -8599,6 +8632,7 @@ typedef enum {
FREEBSD_GCC3_BREAKAGE_FIXIDX, FREEBSD_GCC3_BREAKAGE_FIXIDX,
FREEBSD_GCC4_BREAKAGE_FIXIDX, FREEBSD_GCC4_BREAKAGE_FIXIDX,
GLIBC_C99_INLINE_1_FIXIDX, GLIBC_C99_INLINE_1_FIXIDX,
GLIBC_C99_INLINE_1A_FIXIDX,
GLIBC_C99_INLINE_2_FIXIDX, GLIBC_C99_INLINE_2_FIXIDX,
GLIBC_C99_INLINE_3_FIXIDX, GLIBC_C99_INLINE_3_FIXIDX,
GLIBC_C99_INLINE_4_FIXIDX, GLIBC_C99_INLINE_4_FIXIDX,
...@@ -9020,6 +9054,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { ...@@ -9020,6 +9054,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
GLIBC_C99_INLINE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, GLIBC_C99_INLINE_1_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aGlibc_C99_Inline_1Tests, apzGlibc_C99_Inline_1Patch, 0 }, aGlibc_C99_Inline_1Tests, apzGlibc_C99_Inline_1Patch, 0 },
{ zGlibc_C99_Inline_1aName, zGlibc_C99_Inline_1aList,
apzGlibc_C99_Inline_1aMachs,
GLIBC_C99_INLINE_1A_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
aGlibc_C99_Inline_1aTests, apzGlibc_C99_Inline_1aPatch, 0 },
{ zGlibc_C99_Inline_2Name, zGlibc_C99_Inline_2List, { zGlibc_C99_Inline_2Name, zGlibc_C99_Inline_2List,
apzGlibc_C99_Inline_2Machs, apzGlibc_C99_Inline_2Machs,
GLIBC_C99_INLINE_2_TEST_CT, FD_MACH_ONLY, GLIBC_C99_INLINE_2_TEST_CT, FD_MACH_ONLY,
......
...@@ -1348,6 +1348,24 @@ EOT; ...@@ -1348,6 +1348,24 @@ EOT;
/* /*
* Similar, but a version that didn't have __NO_INLINE__
*/
fix = {
hackname = glibc_c99_inline_1a;
files = features.h, '*/features.h';
select = "(\\) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__)\n"
"(#[ \t]*define[ \t]*__USE_EXTERN_INLINES[ \t]*1)";
c_fix = format;
c_fix_arg = "%1 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)\n%2";
test_text = <<-EOT
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__
# define __USE_EXTERN_INLINES 1
#endif
EOT;
};
/*
* The glibc_c99_inline_1 fix should have fixed everything. Unfortunately * The glibc_c99_inline_1 fix should have fixed everything. Unfortunately
* there are many glibc headers which do not respect __USE_EXTERN_INLINES. * there are many glibc headers which do not respect __USE_EXTERN_INLINES.
* The remaining glibc_c99_inline_* fixes deal with some of those headers. * The remaining glibc_c99_inline_* fixes deal with some of those headers.
...@@ -1378,7 +1396,7 @@ fix = { ...@@ -1378,7 +1396,7 @@ fix = {
hackname = glibc_c99_inline_3; hackname = glibc_c99_inline_3;
files = bits/string2.h, '*/bits/string2.h'; files = bits/string2.h, '*/bits/string2.h';
select = "extern __inline"; select = "extern __inline";
bypass = "__STDC_VERSION__"; bypass = "__extern_inline|__GNU_STDC_INLINE__";
c_fix = format; c_fix = format;
c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)"; c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)";
c_fix_arg = "^# ifdef __cplusplus$"; c_fix_arg = "^# ifdef __cplusplus$";
...@@ -1394,15 +1412,13 @@ fix = { ...@@ -1394,15 +1412,13 @@ fix = {
fix = { fix = {
hackname = glibc_c99_inline_4; hackname = glibc_c99_inline_4;
files = sys/sysmacros.h, '*/sys/sysmacros.h'; files = sys/sysmacros.h, '*/sys/sysmacros.h', wchar.h, '*/wchar.h';
bypass = "__STDC_VERSION__"; bypass = "__extern_inline|__gnu_inline__";
select = "extern __inline"; select = "(^| )extern __inline";
c_fix = format; c_fix = format;
c_fix_arg = "\n#ifdef __GNUC_GNU_INLINE__\nextern\n#endif\n"; c_fix_arg = "%0 __attribute__ ((__gnu_inline__))";
c_fix_arg = '(^| )extern ';
test_text = <<-EOT test_text = <<-EOT
__extension__ extern __inline unsigned int __extension__ extern __inline unsigned int
__extension__ __extern_inline unsigned int
extern __inline unsigned int extern __inline unsigned int
EOT; EOT;
}; };
......
/* DO NOT EDIT THIS FILE.
It has been auto-edited by fixincludes from:
"fixinc/tests/inc/features.h"
This had to be done to correct non-standard usages in the
original, manufacturer supplied header file. */
#if defined( GLIBC_C99_INLINE_1_CHECK )
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
# define __USE_EXTERN_INLINES 1
#endif
#endif /* GLIBC_C99_INLINE_1_CHECK */
#if defined( GLIBC_C99_INLINE_1A_CHECK )
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && (defined __extern_inline || defined __GNUC_GNU_INLINE__)
# define __USE_EXTERN_INLINES 1
#endif
#endif /* GLIBC_C99_INLINE_1A_CHECK */
...@@ -10,15 +10,6 @@ ...@@ -10,15 +10,6 @@
#if defined( GLIBC_C99_INLINE_4_CHECK ) #if defined( GLIBC_C99_INLINE_4_CHECK )
__extension__ __extension__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
#ifdef __GNUC_GNU_INLINE__ extern __inline __attribute__ ((__gnu_inline__)) unsigned int
extern
#endif
__inline unsigned int
__extension__ __extern_inline unsigned int
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline unsigned int
#endif /* GLIBC_C99_INLINE_4_CHECK */ #endif /* GLIBC_C99_INLINE_4_CHECK */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment