replace "extern" only if surrounded by space characters.
From-SVN: r121574
This commit is contained in:
parent
f1bd2543db
commit
5c4f0f4793
@ -1,3 +1,8 @@
|
|||||||
|
2007-02-03 Bruce Korb <bkorb@gnu.org>
|
||||||
|
|
||||||
|
* inclhack.def (glibc_c99_inline_4): replace "extern" only if
|
||||||
|
surrounded by space characters.
|
||||||
|
|
||||||
2007-01-25 Daniel Franke <franke.daniel@gmail.com>
|
2007-01-25 Daniel Franke <franke.daniel@gmail.com>
|
||||||
|
|
||||||
PR target/30272
|
PR target/30272
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
*
|
*
|
||||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||||
*
|
*
|
||||||
* It has been AutoGen-ed Monday January 15, 2007 at 09:38:13 PM CET
|
* It has been AutoGen-ed Sunday February 4, 2007 at 07:08:33 AM PST
|
||||||
* 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 Mo Jan 15 21:38:13 CET 2007
|
/* DO NOT SVN-MERGE THIS FILE, EITHER Sun Feb 4 07:08:34 PST 2007
|
||||||
*
|
*
|
||||||
* You must regenerate it. Use the ./genfixes script.
|
* You must regenerate it. Use the ./genfixes script.
|
||||||
*
|
*
|
||||||
@ -2316,15 +2316,22 @@ tSCC zGlibc_C99_Inline_4List[] =
|
|||||||
*/
|
*/
|
||||||
#define apzGlibc_C99_Inline_4Machs (const char**)NULL
|
#define apzGlibc_C99_Inline_4Machs (const char**)NULL
|
||||||
|
|
||||||
|
/*
|
||||||
|
* content selection pattern - do fix if pattern found
|
||||||
|
*/
|
||||||
|
tSCC zGlibc_C99_Inline_4Select0[] =
|
||||||
|
" extern ";
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* 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__";
|
"__STDC_VERSION__";
|
||||||
|
|
||||||
#define GLIBC_C99_INLINE_4_TEST_CT 1
|
#define GLIBC_C99_INLINE_4_TEST_CT 2
|
||||||
static tTestDesc aGlibc_C99_Inline_4Tests[] = {
|
static tTestDesc aGlibc_C99_Inline_4Tests[] = {
|
||||||
{ TT_NEGREP, zGlibc_C99_Inline_4Bypass0, (regex_t*)NULL }, };
|
{ TT_NEGREP, zGlibc_C99_Inline_4Bypass0, (regex_t*)NULL },
|
||||||
|
{ TT_EGREP, zGlibc_C99_Inline_4Select0, (regex_t*)NULL }, };
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fix Command Arguments for Glibc_C99_Inline_4
|
* Fix Command Arguments for Glibc_C99_Inline_4
|
||||||
@ -2335,7 +2342,6 @@ static const char* apzGlibc_C99_Inline_4Patch[] = {
|
|||||||
#if __STDC_VERSION__ < 19901L\n\
|
#if __STDC_VERSION__ < 19901L\n\
|
||||||
extern\n\
|
extern\n\
|
||||||
#endif\n",
|
#endif\n",
|
||||||
"extern",
|
|
||||||
(char*)NULL };
|
(char*)NULL };
|
||||||
|
|
||||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||||
@ -8419,7 +8425,7 @@ static const char* apzX11_SprintfPatch[] = {
|
|||||||
*
|
*
|
||||||
* List of all fixes
|
* List of all fixes
|
||||||
*/
|
*/
|
||||||
#define REGEX_COUNT 250
|
#define REGEX_COUNT 251
|
||||||
#define MACH_LIST_SIZE_LIMIT 261
|
#define MACH_LIST_SIZE_LIMIT 261
|
||||||
#define FIX_COUNT 207
|
#define FIX_COUNT 207
|
||||||
|
|
||||||
|
@ -654,7 +654,8 @@ fix = {
|
|||||||
*/
|
*/
|
||||||
fix = {
|
fix = {
|
||||||
hackname = alpha___extern_prefix;
|
hackname = alpha___extern_prefix;
|
||||||
select = "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n(#[ \t]*pragma[ \t]*extern_prefix.*)";
|
select = "(.*)(defined\\(__DECC\\)|def[ \t]*__DECC)[ \t]*\n"
|
||||||
|
"(#[ \t]*pragma[ \t]*extern_prefix.*)";
|
||||||
|
|
||||||
mach = "alpha*-dec-osf*";
|
mach = "alpha*-dec-osf*";
|
||||||
c_fix = format;
|
c_fix = format;
|
||||||
@ -681,7 +682,8 @@ fix = {
|
|||||||
c_fix = format;
|
c_fix = format;
|
||||||
c_fix_arg = "%0 && !defined(__PRAGMA_EXTERN_PREFIX)";
|
c_fix_arg = "%0 && !defined(__PRAGMA_EXTERN_PREFIX)";
|
||||||
|
|
||||||
test_text = "#if (_ISO_C_SOURCE>=19990L) && !defined(_LIBC_POLLUTION_H_) && !defined(__DECC)";
|
test_text = "#if (_ISO_C_SOURCE>=19990L) "
|
||||||
|
"&& !defined(_LIBC_POLLUTION_H_) && !defined(__DECC)";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -714,7 +716,8 @@ fix = {
|
|||||||
select = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)';
|
select = '(#define assert\(EX\).*)\(\(int\) \(EX\)\)';
|
||||||
c_fix = format;
|
c_fix = format;
|
||||||
c_fix_arg = "%1(EX)";
|
c_fix_arg = "%1(EX)";
|
||||||
test_text = '#define assert(EX) (((int) (EX)) ? (void)0 : __assert(#EX, __FILE__, __LINE__))';
|
test_text = '#define assert(EX) (((int) (EX)) ? (void)0 '
|
||||||
|
': __assert(#EX, __FILE__, __LINE__))';
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -782,14 +785,17 @@ fix = {
|
|||||||
fix = {
|
fix = {
|
||||||
hackname = alpha_pthread;
|
hackname = alpha_pthread;
|
||||||
files = pthread.h;
|
files = pthread.h;
|
||||||
select = "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)|def _PTHREAD_ENV_DECC)(.*))\n"
|
select = "((#[ \t]*if)([ \t]*defined[ \t]*\\(_PTHREAD_ENV_DECC\\)"
|
||||||
|
"|def _PTHREAD_ENV_DECC)(.*))\n"
|
||||||
"(#[ \t]*define _PTHREAD_USE_PTDNAM_)";
|
"(#[ \t]*define _PTHREAD_USE_PTDNAM_)";
|
||||||
|
|
||||||
mach = "alpha*-dec-osf*";
|
mach = "alpha*-dec-osf*";
|
||||||
c_fix = format;
|
c_fix = format;
|
||||||
c_fix_arg = "%2 defined (_PTHREAD_ENV_DECC)%4 || defined (__PRAGMA_EXTERN_PREFIX)\n%5";
|
c_fix_arg = "%2 defined (_PTHREAD_ENV_DECC)%4 "
|
||||||
|
"|| defined (__PRAGMA_EXTERN_PREFIX)\n%5";
|
||||||
|
|
||||||
test_text = "# if defined (_PTHREAD_ENV_DECC) || defined (_PTHREAD_ENV_EPCC)\n"
|
test_text = "# if defined (_PTHREAD_ENV_DECC) "
|
||||||
|
"|| defined (_PTHREAD_ENV_EPCC)\n"
|
||||||
"# define _PTHREAD_USE_PTDNAM_\n"
|
"# define _PTHREAD_USE_PTDNAM_\n"
|
||||||
"# endif\n"
|
"# endif\n"
|
||||||
"# ifdef _PTHREAD_ENV_DECC\n"
|
"# ifdef _PTHREAD_ENV_DECC\n"
|
||||||
@ -887,8 +893,12 @@ fix = {
|
|||||||
|
|
||||||
mach = "alpha*-dec-osf4*";
|
mach = "alpha*-dec-osf4*";
|
||||||
select = "#define wcstok wcstok_r";
|
select = "#define wcstok wcstok_r";
|
||||||
sed = "s@#define wcstok wcstok_r@extern wchar_t *wcstok __((wchar_t *, const wchar_t *, wchar_t **)) __asm__(\"wcstok_r\");@";
|
sed = "s@#define wcstok wcstok_r@"
|
||||||
sed = "s@#define wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@";
|
"extern wchar_t *wcstok __((wchar_t *, const wchar_t *, "
|
||||||
|
"wchar_t **)) __asm__(\"wcstok_r\");@";
|
||||||
|
sed = "s@#define wcsftime __wcsftime_isoc@"
|
||||||
|
"extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *"
|
||||||
|
", const struct tm *)) __asm__(\"__wcsftime_isoc\");@";
|
||||||
test_text = "#define wcstok wcstok_r\n"
|
test_text = "#define wcstok wcstok_r\n"
|
||||||
"#define wcsftime __wcsftime_isoc";
|
"#define wcsftime __wcsftime_isoc";
|
||||||
};
|
};
|
||||||
@ -1320,21 +1330,21 @@ fix = {
|
|||||||
hackname = glibc_c99_inline_2;
|
hackname = glibc_c99_inline_2;
|
||||||
files = sys/stat.h, '*/sys/stat.h';
|
files = sys/stat.h, '*/sys/stat.h';
|
||||||
select = "extern __inline__ int";
|
select = "extern __inline__ int";
|
||||||
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
|
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
|
||||||
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
||||||
"__inline__ int \\1/";
|
"__inline__ int \\1/";
|
||||||
sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
|
sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
|
||||||
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
||||||
"__inline__ int __REDIRECT\\1 (\\2/";
|
"__inline__ int __REDIRECT\\1 (\\2/";
|
||||||
sed = "s/^extern __inline__ int/"
|
sed = "s/^extern __inline__ int/"
|
||||||
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
|
||||||
"__inline__ int/";
|
"__inline__ int/";
|
||||||
test_text = <<-EOT
|
test_text = <<-EOT
|
||||||
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
|
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
|
||||||
extern __inline__ int
|
extern __inline__ int
|
||||||
__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
|
__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
|
||||||
{}
|
{}
|
||||||
EOT;
|
EOT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1346,12 +1356,12 @@ fix = {
|
|||||||
c_fix_arg = "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L";
|
c_fix_arg = "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L";
|
||||||
c_fix_arg = "^# ifdef __cplusplus$";
|
c_fix_arg = "^# ifdef __cplusplus$";
|
||||||
test_text = <<-EOT
|
test_text = <<-EOT
|
||||||
# ifdef __cplusplus
|
# ifdef __cplusplus
|
||||||
# define __STRING_INLINE inline
|
# define __STRING_INLINE inline
|
||||||
# else
|
# else
|
||||||
# define __STRING_INLINE extern __inline
|
# define __STRING_INLINE extern __inline
|
||||||
# endif
|
# endif
|
||||||
EOT;
|
EOT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -1359,12 +1369,13 @@ 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';
|
||||||
bypass = "__STDC_VERSION__";
|
bypass = "__STDC_VERSION__";
|
||||||
|
select = ' extern ';
|
||||||
c_fix = format;
|
c_fix = format;
|
||||||
c_fix_arg = "\n#if __STDC_VERSION__ < 19901L\nextern\n#endif\n";
|
c_fix_arg = "\n#if __STDC_VERSION__ < 19901L\nextern\n#endif\n";
|
||||||
c_fix_arg = "extern";
|
|
||||||
test_text = <<-EOT
|
test_text = <<-EOT
|
||||||
__extension__ extern __inline unsigned int
|
__extension__ extern __inline unsigned int
|
||||||
EOT;
|
__extension__ __extern_inline unsigned int
|
||||||
|
EOT;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -10,9 +10,10 @@
|
|||||||
|
|
||||||
|
|
||||||
#if defined( GLIBC_C99_INLINE_4_CHECK )
|
#if defined( GLIBC_C99_INLINE_4_CHECK )
|
||||||
__extension__
|
__extension__
|
||||||
#if __STDC_VERSION__ < 19901L
|
#if __STDC_VERSION__ < 19901L
|
||||||
extern
|
extern
|
||||||
#endif
|
#endif
|
||||||
__inline unsigned int
|
__inline unsigned int
|
||||||
|
__extension__ __extern_inline unsigned int
|
||||||
#endif /* GLIBC_C99_INLINE_4_CHECK */
|
#endif /* GLIBC_C99_INLINE_4_CHECK */
|
||||||
|
Loading…
Reference in New Issue
Block a user