inclhack.def (glibc_c99_inline_1): Define __USE_EXTERN_INLINES if __extern_inline or __GNUC_GNU_INLINE__ is...

* inclhack.def (glibc_c99_inline_1): Define __USE_EXTERN_INLINES
	if __extern_inline or __GNUC_GNU_INLINE__ is defined rather than
	__STDC_VERSION__ < 199901L.
	(glibc_c99_inline_2): Replace #if __STDC_VERSION__ < 199901L
	with #ifdef __GNUC_GNU_INLINE__.
	(glibc_c99_inline_3): Add select.  Replace __STDC_VERSION__ >= 199901L
	with defined(__GNUC_STDC_INLINE__).
	(glibc_c99_inline_4): Change select, add second c_fix_arg.
	Replace #if __STDC_VERSION__ < 199901L with
	#ifdef __GNUC_GNU_INLINE__.
	* fixincl.x: Regenerated.
	* tests/base/bits/string2.h: Update.
	* tests/base/sys/sysmacros.h: Update.
	* tests/base/sys/stat.h: Update.

From-SVN: r123216
This commit is contained in:
Jakub Jelinek 2007-03-26 15:25:26 +02:00 committed by Jakub Jelinek
parent 85acef0e28
commit cb3790cb4e
6 changed files with 51 additions and 24 deletions

View File

@ -1,3 +1,20 @@
2007-03-26 Jakub Jelinek <jakub@redhat.com>
* inclhack.def (glibc_c99_inline_1): Define __USE_EXTERN_INLINES
if __extern_inline or __GNUC_GNU_INLINE__ is defined rather than
__STDC_VERSION__ < 199901L.
(glibc_c99_inline_2): Replace #if __STDC_VERSION__ < 199901L
with #ifdef __GNUC_GNU_INLINE__.
(glibc_c99_inline_3): Add select. Replace __STDC_VERSION__ >= 199901L
with defined(__GNUC_STDC_INLINE__).
(glibc_c99_inline_4): Change select, add second c_fix_arg.
Replace #if __STDC_VERSION__ < 199901L with
#ifdef __GNUC_GNU_INLINE__.
* fixincl.x: Regenerated.
* tests/base/bits/string2.h: Update.
* tests/base/sys/sysmacros.h: Update.
* tests/base/sys/stat.h: Update.
2007-03-18 Krister Walfridsson <cato@df.lth.se>
PR target/30058

View File

@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed Sunday March 18, 2007 at 05:06:12 PM CET
* It has been AutoGen-ed Wednesday March 21, 2007 at 05:39:23 PM CET
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Mar 18 17:06:12 CET 2007
/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Mar 21 17:39:23 CET 2007
*
* You must regenerate it. Use the ./genfixes script.
*
@ -2215,7 +2215,7 @@ static tTestDesc aGlibc_C99_Inline_1Tests[] = {
*/
static const char* apzGlibc_C99_Inline_1Patch[] = {
"format",
"%0 && __STDC_VERSION__ < 199901L",
"%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@ -2249,15 +2249,15 @@ static tTestDesc aGlibc_C99_Inline_2Tests[] = {
* Fix Command Arguments for Glibc_C99_Inline_2
*/
static const char* apzGlibc_C99_Inline_2Patch[] = { "sed",
"-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#if __STDC_VERSION__ < 199901L\\\n\
"-e", "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int \\1/",
"-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#if __STDC_VERSION__ < 199901L\\\n\
"-e", "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int __REDIRECT\\1 (\\2/",
"-e", "s/^extern __inline__ int/#if __STDC_VERSION__ < 199901L\\\n\
"-e", "s/^extern __inline__ int/#ifdef __GNUC_GNU_INLINE__\\\n\
extern\\\n\
#endif\\\n\
__inline__ int/",
@ -2280,22 +2280,29 @@ tSCC zGlibc_C99_Inline_3List[] =
*/
#define apzGlibc_C99_Inline_3Machs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_3Select0[] =
"extern __inline";
/*
* content bypass pattern - skip fix if pattern found
*/
tSCC zGlibc_C99_Inline_3Bypass0[] =
"__STDC_VERSION__";
#define GLIBC_C99_INLINE_3_TEST_CT 1
#define GLIBC_C99_INLINE_3_TEST_CT 2
static tTestDesc aGlibc_C99_Inline_3Tests[] = {
{ TT_NEGREP, zGlibc_C99_Inline_3Bypass0, (regex_t*)NULL }, };
{ TT_NEGREP, zGlibc_C99_Inline_3Bypass0, (regex_t*)NULL },
{ TT_EGREP, zGlibc_C99_Inline_3Select0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Glibc_C99_Inline_3
*/
static const char* apzGlibc_C99_Inline_3Patch[] = {
"format",
"# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L",
"# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)",
"^# ifdef __cplusplus$",
(char*)NULL };
@ -2320,7 +2327,7 @@ tSCC zGlibc_C99_Inline_4List[] =
* content selection pattern - do fix if pattern found
*/
tSCC zGlibc_C99_Inline_4Select0[] =
"(^| )extern ";
"extern __inline";
/*
* content bypass pattern - skip fix if pattern found
@ -2339,9 +2346,10 @@ static tTestDesc aGlibc_C99_Inline_4Tests[] = {
static const char* apzGlibc_C99_Inline_4Patch[] = {
"format",
"\n\
#if __STDC_VERSION__ < 199901L\n\
#ifdef __GNUC_GNU_INLINE__\n\
extern\n\
#endif\n",
"(^| )extern ",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
@ -8466,7 +8474,7 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 252
#define REGEX_COUNT 253
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 208

View File

@ -1311,7 +1311,7 @@ fix = {
files = features.h, '*/features.h';
select = "^ *&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__$";
c_fix = format;
c_fix_arg = "%0 && __STDC_VERSION__ < 199901L";
c_fix_arg = "%0 && (defined __extern_inline || defined __GNUC_GNU_INLINE__)";
test_text = <<-EOT
#if __GNUC_PREREQ (2, 7) && defined __OPTIMIZE__ \
&& !defined __OPTIMIZE_SIZE__ && !defined __NO_INLINE__
@ -1331,13 +1331,13 @@ fix = {
files = sys/stat.h, '*/sys/stat.h';
select = "extern __inline__ int";
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int __REDIRECT\\1 (\\2/";
sed = "s/^extern __inline__ int/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"#ifdef __GNUC_GNU_INLINE__\\\nextern\\\n#endif\\\n"
"__inline__ int/";
test_text = <<-EOT
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
@ -1351,9 +1351,10 @@ fix = {
fix = {
hackname = glibc_c99_inline_3;
files = bits/string2.h, '*/bits/string2.h';
select = "extern __inline";
bypass = "__STDC_VERSION__";
c_fix = format;
c_fix_arg = "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L";
c_fix_arg = "# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)";
c_fix_arg = "^# ifdef __cplusplus$";
test_text = <<-EOT
# ifdef __cplusplus
@ -1369,9 +1370,10 @@ fix = {
hackname = glibc_c99_inline_4;
files = sys/sysmacros.h, '*/sys/sysmacros.h';
bypass = "__STDC_VERSION__";
select = '(^| )extern ';
select = "extern __inline";
c_fix = format;
c_fix_arg = "\n#if __STDC_VERSION__ < 199901L\nextern\n#endif\n";
c_fix_arg = "\n#ifdef __GNUC_GNU_INLINE__\nextern\n#endif\n";
c_fix_arg = '(^| )extern ';
test_text = <<-EOT
__extension__ extern __inline unsigned int
__extension__ __extern_inline unsigned int

View File

@ -10,7 +10,7 @@
#if defined( GLIBC_C99_INLINE_3_CHECK )
# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L
# if defined(__cplusplus) || defined(__GNUC_STDC_INLINE__)
# define __STRING_INLINE inline
# else
# define __STRING_INLINE extern __inline

View File

@ -15,11 +15,11 @@
#if defined( GLIBC_C99_INLINE_2_CHECK )
#if __STDC_VERSION__ < 199901L
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline__ int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
#if __STDC_VERSION__ < 199901L
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline__ int

View File

@ -11,13 +11,13 @@
#if defined( GLIBC_C99_INLINE_4_CHECK )
__extension__
#if __STDC_VERSION__ < 199901L
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline unsigned int
__extension__ __extern_inline unsigned int
#if __STDC_VERSION__ < 199901L
#ifdef __GNUC_GNU_INLINE__
extern
#endif
__inline unsigned int