aboutsummaryrefslogtreecommitdiff
path: root/gcc/fixinc/inclhack.def
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2003-05-22 17:03:57 +0000
committerZack Weinberg <zack@gcc.gnu.org>2003-05-22 17:03:57 +0000
commit5ded58d0e10310c317f6db232d14a6beadb577f1 (patch)
tree281c2b1a41f4ef6d8c613b6d7e1cd7fca787d56d /gcc/fixinc/inclhack.def
parent36f9020c1418f941e5c00339730972335e5dcd7b (diff)
downloadgcc-5ded58d0e10310c317f6db232d14a6beadb577f1.zip
gcc-5ded58d0e10310c317f6db232d14a6beadb577f1.tar.gz
gcc-5ded58d0e10310c317f6db232d14a6beadb577f1.tar.bz2
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
Diffstat (limited to 'gcc/fixinc/inclhack.def')
-rw-r--r--gcc/fixinc/inclhack.def19
1 files changed, 16 insertions, 3 deletions
diff --git a/gcc/fixinc/inclhack.def b/gcc/fixinc/inclhack.def
index 3aa46c4..f3ce2c3 100644
--- a/gcc/fixinc/inclhack.def
+++ b/gcc/fixinc/inclhack.def
@@ -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;