re PR other/2873 ([3.3 only][fixinclude] Bogus fixinclude of stdio.h from glibc 2.2.3)
PR other/2873 * fixinc/inclhack.def (avoid_wchar_t_type): Add bypass expressions to prevent triggering on recent curses.h, linux/nls.h, or X11/Xlib.h. (stdio_va_list): Add _G_va_list to bypass pattern. (strict_ansi_not): Add bypass pattern for __SCO_VERSION__. * fixinc/fixincl.x: Regenerate. From-SVN: r67090
This commit is contained in:
parent
36f9020c14
commit
5ded58d0e1
@ -1,3 +1,13 @@
|
||||
2003-05-22 Zack Weinberg <zack@codesourcery.com>
|
||||
|
||||
PR other/2873
|
||||
* fixinc/inclhack.def (avoid_wchar_t_type): Add bypass
|
||||
expressions to prevent triggering on recent curses.h,
|
||||
linux/nls.h, or X11/Xlib.h.
|
||||
(stdio_va_list): Add _G_va_list to bypass pattern.
|
||||
(strict_ansi_not): Add bypass pattern for __SCO_VERSION__.
|
||||
* fixinc/fixincl.x: Regenerate.
|
||||
|
||||
2003-05-22 Rekha Bhintade <rekhad@kpitcummins.com>
|
||||
|
||||
* gcc/config/sh/sh.h (TARGET_SWITCHES): Display all the target
|
||||
|
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Saturday May 3, 2003 at 03:55:13 PM PDT
|
||||
* It has been AutoGen-ed Thursday May 22, 2003 at 10:03:21 AM PDT
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Sat May 3 15:55:13 PDT 2003
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Thu May 22 10:03:21 PDT 2003
|
||||
*
|
||||
* You must regenerate it. Use the ./genfixes script.
|
||||
*
|
||||
@ -276,14 +276,12 @@ fix = {\n\
|
||||
files = sys/varargs.h;\n\
|
||||
replace = \"/* This file was generated by fixincludes. */\\n\"\n\
|
||||
\"#ifndef _SYS_VARARGS_H\\n\"\n\
|
||||
\"#define _SYS_VARARGS_H\\n\\n\"\n\
|
||||
\n\
|
||||
\"#define _SYS_VARARGS_H\\n\\n\"\n\n\
|
||||
\"#ifdef __STDC__\\n\"\n\
|
||||
\"#include <stdarg.h>\\n\"\n\
|
||||
\"#else\\n\"\n\
|
||||
\"#include <varargs.h>\\n\"\n\
|
||||
\"#endif\\n\\n\"\n\
|
||||
\n\
|
||||
\"#endif\\n\\n\"\n\n\
|
||||
\"#endif /* _SYS_VARARGS_H */\\n\";\n\
|
||||
};\n\
|
||||
#endif\n\n\n\
|
||||
@ -1005,8 +1003,21 @@ tSCC zAvoid_Wchar_T_TypeName[] =
|
||||
tSCC zAvoid_Wchar_T_TypeSelect0[] =
|
||||
"^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
|
||||
|
||||
#define AVOID_WCHAR_T_TYPE_TEST_CT 1
|
||||
/*
|
||||
* content bypass pattern - skip fix if pattern found
|
||||
*/
|
||||
tSCC zAvoid_Wchar_T_TypeBypass0[] =
|
||||
"we must use the C\\+\\+ compiler's type";
|
||||
tSCC zAvoid_Wchar_T_TypeBypass1[] =
|
||||
"_LINUX_NLS_H";
|
||||
tSCC zAvoid_Wchar_T_TypeBypass2[] =
|
||||
"XFree86: xc/lib/X11/Xlib\\.h";
|
||||
|
||||
#define AVOID_WCHAR_T_TYPE_TEST_CT 4
|
||||
static tTestDesc aAvoid_Wchar_T_TypeTests[] = {
|
||||
{ TT_NEGREP, zAvoid_Wchar_T_TypeBypass0, (regex_t*)NULL },
|
||||
{ TT_NEGREP, zAvoid_Wchar_T_TypeBypass1, (regex_t*)NULL },
|
||||
{ TT_NEGREP, zAvoid_Wchar_T_TypeBypass2, (regex_t*)NULL },
|
||||
{ TT_EGREP, zAvoid_Wchar_T_TypeSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
@ -4125,7 +4136,7 @@ tSCC zStdio_Va_ListList[] =
|
||||
* content bypass pattern - skip fix if pattern found
|
||||
*/
|
||||
tSCC zStdio_Va_ListBypass0[] =
|
||||
"__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list";
|
||||
"__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list";
|
||||
|
||||
#define STDIO_VA_LIST_TEST_CT 1
|
||||
static tTestDesc aStdio_Va_ListTests[] = {
|
||||
@ -4177,16 +4188,19 @@ tSCC zStrict_Ansi_NotSelect0[] =
|
||||
*/
|
||||
tSCC zStrict_Ansi_NotBypass0[] =
|
||||
"GNU and MIPS C compilers define __STDC__ differently";
|
||||
tSCC zStrict_Ansi_NotBypass1[] =
|
||||
"__SCO_VERSION__.*__STDC__ != 1";
|
||||
|
||||
/*
|
||||
* perform the C function call test
|
||||
*/
|
||||
tSCC zStrict_Ansi_NotFTst0[] = "stdc_0_in_system_headers";
|
||||
|
||||
#define STRICT_ANSI_NOT_TEST_CT 3
|
||||
#define STRICT_ANSI_NOT_TEST_CT 4
|
||||
static tTestDesc aStrict_Ansi_NotTests[] = {
|
||||
{ TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ },
|
||||
{ TT_NEGREP, zStrict_Ansi_NotBypass0, (regex_t*)NULL },
|
||||
{ TT_NEGREP, zStrict_Ansi_NotBypass1, (regex_t*)NULL },
|
||||
{ TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
@ -6004,7 +6018,7 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 164
|
||||
#define REGEX_COUNT 168
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 152
|
||||
|
||||
|
@ -633,12 +633,19 @@ fix = {
|
||||
/*
|
||||
* For C++, avoid any typedef definition of wchar_t,
|
||||
* and use the built in type instead.
|
||||
* Don't do this for headers that are smart enough to do the right
|
||||
* thing (recent [n]curses.h and Xlib.h).
|
||||
* Don't do it for <linux/nls.h> which is never used from C++ anyway,
|
||||
* and will be broken by the edit.
|
||||
*/
|
||||
|
||||
fix = {
|
||||
hackname = avoid_wchar_t_type;
|
||||
|
||||
select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;";
|
||||
bypass = "we must use the C\\+\\+ compiler's type";
|
||||
bypass = "_LINUX_NLS_H";
|
||||
bypass = "XFree86: xc/lib/X11/Xlib\\.h";
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
|
||||
@ -2277,13 +2284,16 @@ fix = {
|
||||
|
||||
/*
|
||||
* Don't use or define the name va_list in stdio.h.
|
||||
* This is for ANSI and also to interoperate properly with gcc's varargs.h.
|
||||
* Note _BSD_VA_LIST_ is dealt with elsewhere.
|
||||
* This is for ANSI and also to interoperate properly with gcc's
|
||||
* varargs.h. Note _BSD_VA_LIST_ is dealt with elsewhere. The
|
||||
* presence of __gnuc_va_list, __DJ_va_list, or _G_va_list is taken
|
||||
* to indicate that the header knows what it's doing -- under SUSv2,
|
||||
* stdio.h is required to define va_list, and we shouldn't break that.
|
||||
*/
|
||||
fix = {
|
||||
hackname = stdio_va_list;
|
||||
files = stdio.h;
|
||||
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list';
|
||||
bypass = '__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list';
|
||||
|
||||
/*
|
||||
* Use __gnuc_va_list in arg types in place of va_list.
|
||||
@ -2325,6 +2335,9 @@ fix = {
|
||||
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
|
||||
/* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */
|
||||
bypass = 'GNU and MIPS C compilers define __STDC__ differently';
|
||||
/* GNU gmp.h uses "__STDC__ != 1" only if __SCO_VERSION__, which
|
||||
is not defined by GCC, so it is safe. */
|
||||
bypass = '__SCO_VERSION__.*__STDC__ != 1';
|
||||
c_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
|
Loading…
Reference in New Issue
Block a user