Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
5c4f0f47
Commit
5c4f0f47
authored
Feb 04, 2007
by
Bruce Korb
Committed by
Bruce Korb
Feb 04, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace "extern" only if surrounded by space characters.
From-SVN: r121574
parent
f1bd2543
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
62 additions
and
39 deletions
+62
-39
fixincludes/ChangeLog
+5
-0
fixincludes/fixincl.x
+12
-6
fixincludes/inclhack.def
+42
-31
fixincludes/tests/base/sys/sysmacros.h
+3
-2
No files found.
fixincludes/ChangeLog
View file @
5c4f0f47
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>
PR target/30272
...
...
fixincludes/fixincl.x
View file @
5c4f0f47
...
...
@@ -2,11 +2,11 @@
*
* DO NOT EDIT THIS FILE (fixincl.x)
*
* It has been AutoGen-ed
Monday January 15, 2007 at 09:38:13 PM CE
T
* It has been AutoGen-ed
Sunday February 4, 2007 at 07:08:33 AM PS
T
* From the definitions inclhack.def
* and the template file fixincl
*/
/* DO NOT SVN-MERGE THIS FILE, EITHER
Mo Jan 15 21:38:13 CE
T 2007
/* DO NOT SVN-MERGE THIS FILE, EITHER
Sun Feb 4 07:08:34 PS
T 2007
*
* You must regenerate it. Use the ./genfixes script.
*
...
...
@@ -2317,14 +2317,21 @@ tSCC zGlibc_C99_Inline_4List[] =
#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
*/
tSCC zGlibc_C99_Inline_4Bypass0[] =
"__STDC_VERSION__";
#define GLIBC_C99_INLINE_4_TEST_CT
1
#define GLIBC_C99_INLINE_4_TEST_CT
2
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
...
...
@@ -2335,7 +2342,6 @@ static const char* apzGlibc_C99_Inline_4Patch[] = {
#if __STDC_VERSION__ < 19901L\n\
extern\n\
#endif\n",
"extern",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -8419,7 +8425,7 @@ static const char* apzX11_SprintfPatch[] = {
*
* List of all fixes
*/
#define REGEX_COUNT 25
0
#define REGEX_COUNT 25
1
#define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 207
...
...
fixincludes/inclhack.def
View file @
5c4f0f47
...
...
@@ -654,7 +654,8 @@ fix = {
*/
fix = {
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*";
c_fix = format;
...
...
@@ -681,7 +682,8 @@ fix = {
c_fix = format;
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\)\)';
c_fix = format;
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 = {
hackname = alpha_pthread;
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_)";
mach = "alpha*-dec-osf*";
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"
"# endif\n"
"# ifdef _PTHREAD_ENV_DECC\n"
...
...
@@ -887,8 +893,12 @@ fix = {
mach = "alpha*-dec-osf4*";
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 wcsftime __wcsftime_isoc@extern size_t wcsftime __((wchar_t *, size_t, const wchar_t *, const struct tm *)) __asm__(\"__wcsftime_isoc\");@";
sed = "s@#define wcstok wcstok_r@"
"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"
"#define wcsftime __wcsftime_isoc";
};
...
...
@@ -1320,21 +1330,21 @@ fix = {
hackname = glibc_c99_inline_2;
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"
"__inline__ int \\1/";
sed
= "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"__inline__ int __REDIRECT\\1 (\\2/";
sed
= "s/^extern __inline__ int/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"__inline__ int/";
sed = "s/extern int \\(stat\\|lstat\\|fstat\\|mknod\\)/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"__inline__ int \\1/";
sed = "s/extern int __REDIRECT\\(_NTH\\|\\) (\\(stat\\|lstat\\|fstat\\)/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"__inline__ int __REDIRECT\\1 (\\2/";
sed = "s/^extern __inline__ int/"
"#if __STDC_VERSION__ < 199901L\\\nextern\\\n#endif\\\n"
"__inline__ int/";
test_text = <<-EOT
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
extern __inline__ int
__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
{}
EOT;
extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2));
extern __inline__ int
__NTH (fstat64 (int __fd, struct stat64 *__statbuf))
{}
EOT;
};
...
...
@@ -1346,12 +1356,12 @@ fix = {
c_fix_arg = "# if defined(__cplusplus) || __STDC_VERSION__ >= 19901L";
c_fix_arg = "^# ifdef __cplusplus$";
test_text = <<-EOT
# ifdef __cplusplus
# define __STRING_INLINE inline
# else
# define __STRING_INLINE extern __inline
# endif
EOT;
# ifdef __cplusplus
# define __STRING_INLINE inline
# else
# define __STRING_INLINE extern __inline
# endif
EOT;
};
...
...
@@ -1359,12 +1369,13 @@ fix = {
hackname = glibc_c99_inline_4;
files = sys/sysmacros.h, '*/sys/sysmacros.h';
bypass = "__STDC_VERSION__";
select = ' extern ';
c_fix = format;
c_fix_arg = "\n#if __STDC_VERSION__ < 19901L\nextern\n#endif\n";
c_fix_arg = "extern";
test_text = <<-EOT
__extension__ extern __inline unsigned int
EOT;
__extension__ extern __inline unsigned int
__extension__ __extern_inline unsigned int
EOT;
};
...
...
fixincludes/tests/base/sys/sysmacros.h
View file @
5c4f0f47
...
...
@@ -10,9 +10,10 @@
#if defined( GLIBC_C99_INLINE_4_CHECK )
__extension__
__extension__
#if __STDC_VERSION__ < 19901L
extern
#endif
__inline
unsigned
int
__inline
unsigned
int
__extension__
__extern_inline
unsigned
int
#endif
/* GLIBC_C99_INLINE_4_CHECK */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment