Commit 5ded58d0 by Zack Weinberg

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
parent 36f9020c
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> 2003-05-22 Rekha Bhintade <rekhad@kpitcummins.com>
* gcc/config/sh/sh.h (TARGET_SWITCHES): Display all the target * gcc/config/sh/sh.h (TARGET_SWITCHES): Display all the target
switches when --target-help option is specified. switches when --target-help option is specified.
2003-05-22 Eric Botcazou <ebotcazou@libertysurf.fr> 2003-05-22 Eric Botcazou <ebotcazou@libertysurf.fr>
...@@ -177,12 +187,12 @@ ...@@ -177,12 +187,12 @@
2003-05-19 Seth Arnold <sarnold@wirex.com> 2003-05-19 Seth Arnold <sarnold@wirex.com>
Aldy Hernandez <aldyh@redhat.com> Aldy Hernandez <aldyh@redhat.com>
* config/rs6000/rs6000.c (rs6000_stack_info): Do not add * config/rs6000/rs6000.c (rs6000_stack_info): Do not add
vrsave_size twice. vrsave_size twice.
2003-05-19 Aldy Hernandez <aldyh@redhat.com> 2003-05-19 Aldy Hernandez <aldyh@redhat.com>
* doc/tm.texi (function_arg): Fix typo. * doc/tm.texi (function_arg): Fix typo.
2003-05-19 Matt Austern <austern@apple.com> 2003-05-19 Matt Austern <austern@apple.com>
...@@ -192,9 +202,9 @@ ...@@ -192,9 +202,9 @@
* doc/invoke.texi: Document -Winvalid-offsetof. * doc/invoke.texi: Document -Winvalid-offsetof.
* testsuite/g++.dg/other/offsetof3.C: New. * testsuite/g++.dg/other/offsetof3.C: New.
* testsuite/g++.dg/other/offsetof4.C: New. * testsuite/g++.dg/other/offsetof4.C: New.
2003-05-19 Kevin B. Hendricks <kevin.hendricks@sympatico.ca> 2003-05-19 Kevin B. Hendricks <kevin.hendricks@sympatico.ca>
David Edelsohn <edelsohn@gnu.org> David Edelsohn <edelsohn@gnu.org>
* config/rs6000/rs6000.c (rs6000_alignment_string, * config/rs6000/rs6000.c (rs6000_alignment_string,
rs6000_alignment_flags): New variables. rs6000_alignment_flags): New variables.
......
...@@ -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 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 * From the definitions inclhack.def
* and the template file fixincl * 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. * You must regenerate it. Use the ./genfixes script.
* *
...@@ -276,14 +276,12 @@ fix = {\n\ ...@@ -276,14 +276,12 @@ fix = {\n\
files = sys/varargs.h;\n\ files = sys/varargs.h;\n\
replace = \"/* This file was generated by fixincludes. */\\n\"\n\ replace = \"/* This file was generated by fixincludes. */\\n\"\n\
\"#ifndef _SYS_VARARGS_H\\n\"\n\ \"#ifndef _SYS_VARARGS_H\\n\"\n\
\"#define _SYS_VARARGS_H\\n\\n\"\n\ \"#define _SYS_VARARGS_H\\n\\n\"\n\n\
\n\
\"#ifdef __STDC__\\n\"\n\ \"#ifdef __STDC__\\n\"\n\
\"#include <stdarg.h>\\n\"\n\ \"#include <stdarg.h>\\n\"\n\
\"#else\\n\"\n\ \"#else\\n\"\n\
\"#include <varargs.h>\\n\"\n\ \"#include <varargs.h>\\n\"\n\
\"#endif\\n\\n\"\n\ \"#endif\\n\\n\"\n\n\
\n\
\"#endif /* _SYS_VARARGS_H */\\n\";\n\ \"#endif /* _SYS_VARARGS_H */\\n\";\n\
};\n\ };\n\
#endif\n\n\n\ #endif\n\n\n\
...@@ -1005,8 +1003,21 @@ tSCC zAvoid_Wchar_T_TypeName[] = ...@@ -1005,8 +1003,21 @@ tSCC zAvoid_Wchar_T_TypeName[] =
tSCC zAvoid_Wchar_T_TypeSelect0[] = tSCC zAvoid_Wchar_T_TypeSelect0[] =
"^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;"; "^[ \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[] = { 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 }, }; { TT_EGREP, zAvoid_Wchar_T_TypeSelect0, (regex_t*)NULL }, };
/* /*
...@@ -4125,7 +4136,7 @@ tSCC zStdio_Va_ListList[] = ...@@ -4125,7 +4136,7 @@ tSCC zStdio_Va_ListList[] =
* content bypass pattern - skip fix if pattern found * content bypass pattern - skip fix if pattern found
*/ */
tSCC zStdio_Va_ListBypass0[] = 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 #define STDIO_VA_LIST_TEST_CT 1
static tTestDesc aStdio_Va_ListTests[] = { static tTestDesc aStdio_Va_ListTests[] = {
...@@ -4177,16 +4188,19 @@ tSCC zStrict_Ansi_NotSelect0[] = ...@@ -4177,16 +4188,19 @@ tSCC zStrict_Ansi_NotSelect0[] =
*/ */
tSCC zStrict_Ansi_NotBypass0[] = tSCC zStrict_Ansi_NotBypass0[] =
"GNU and MIPS C compilers define __STDC__ differently"; "GNU and MIPS C compilers define __STDC__ differently";
tSCC zStrict_Ansi_NotBypass1[] =
"__SCO_VERSION__.*__STDC__ != 1";
/* /*
* perform the C function call test * perform the C function call test
*/ */
tSCC zStrict_Ansi_NotFTst0[] = "stdc_0_in_system_headers"; 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[] = { static tTestDesc aStrict_Ansi_NotTests[] = {
{ TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ }, { TT_FUNCTION, zStrict_Ansi_NotFTst0, 0 /* unused */ },
{ TT_NEGREP, zStrict_Ansi_NotBypass0, (regex_t*)NULL }, { TT_NEGREP, zStrict_Ansi_NotBypass0, (regex_t*)NULL },
{ TT_NEGREP, zStrict_Ansi_NotBypass1, (regex_t*)NULL },
{ TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, }; { TT_EGREP, zStrict_Ansi_NotSelect0, (regex_t*)NULL }, };
/* /*
...@@ -6004,7 +6018,7 @@ static const char* apzX11_SprintfPatch[] = { ...@@ -6004,7 +6018,7 @@ static const char* apzX11_SprintfPatch[] = {
* *
* List of all fixes * List of all fixes
*/ */
#define REGEX_COUNT 164 #define REGEX_COUNT 168
#define MACH_LIST_SIZE_LIMIT 261 #define MACH_LIST_SIZE_LIMIT 261
#define FIX_COUNT 152 #define FIX_COUNT 152
......
...@@ -633,12 +633,19 @@ fix = { ...@@ -633,12 +633,19 @@ fix = {
/* /*
* For C++, avoid any typedef definition of wchar_t, * For C++, avoid any typedef definition of wchar_t,
* and use the built in type instead. * 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 = { fix = {
hackname = avoid_wchar_t_type; hackname = avoid_wchar_t_type;
select = "^[ \t]*typedef[ \t].*[ \t]wchar_t[ \t]*;"; 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 = format;
c_fix_arg = "#ifndef __cplusplus\n%0\n#endif"; c_fix_arg = "#ifndef __cplusplus\n%0\n#endif";
...@@ -2277,13 +2284,16 @@ fix = { ...@@ -2277,13 +2284,16 @@ fix = {
/* /*
* Don't use or define the name va_list in stdio.h. * 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. * This is for ANSI and also to interoperate properly with gcc's
* Note _BSD_VA_LIST_ is dealt with elsewhere. * 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 = { fix = {
hackname = stdio_va_list; hackname = stdio_va_list;
files = stdio.h; 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. * Use __gnuc_va_list in arg types in place of va_list.
...@@ -2325,6 +2335,9 @@ fix = { ...@@ -2325,6 +2335,9 @@ fix = {
"|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)"; "|__STDC__[ \t]*-[ \t]*0[ \t]*==[ \t]*0)";
/* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */ /* Tru64 UNIX V4.0F/V5.1 <standards.h> supports GCC usage of __STDC__. */
bypass = 'GNU and MIPS C compilers define __STDC__ differently'; 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_test = stdc_0_in_system_headers;
c_fix = format; c_fix = format;
......
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