From 877251155ba19212871966c65f4a283907eeb54e Mon Sep 17 00:00:00 2001 From: Alexander Ivchenko Date: Thu, 23 May 2013 12:52:01 +0000 Subject: [PATCH] inclhack.def (complier_h_tradcpp): New. * inclhack.def (complier_h_tradcpp): New. * fixincl.x: Rebuilt. * tests/base/linux/compiler.h: New. From-SVN: r199249 --- fixincludes/ChangeLog | 6 +++++ fixincludes/fixincl.x | 55 +++++++++++++++++++++++++++++++++++----- fixincludes/inclhack.def | 14 ++++++++++ 3 files changed, 68 insertions(+), 7 deletions(-) diff --git a/fixincludes/ChangeLog b/fixincludes/ChangeLog index f38c0b1c19e..02fb1497f7b 100644 --- a/fixincludes/ChangeLog +++ b/fixincludes/ChangeLog @@ -1,3 +1,9 @@ +2013-05-23 Alexander Ivchenko + + * inclhack.def (complier_h_tradcpp): New. + * fixincl.x: Rebuilt. + * tests/base/linux/compiler.h: New. + 2013-05-17 Rainer Orth * inclhack.def (solaris_pow_int_overload): Update comment. diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index 1695bcd7beb..2563528e14e 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed Thursday May 16, 2013 at 01:20:52 PM MEST + * It has been AutoGen-ed May 23, 2013 at 04:44:10 PM by AutoGen 5.12 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 16 13:20:52 MEST 2013 +/* DO NOT SVN-MERGE THIS FILE, EITHER Thu May 23 16:44:10 MSK 2013 * * You must regenerate it. Use the ./genfixes script. * @@ -15,7 +15,7 @@ * certain ANSI-incompatible system header files which are fixed to work * correctly with ANSI C and placed in a directory that GNU C will search. * - * This file contains 227 fixup descriptions. + * This file contains 228 fixup descriptions. * * See README for more information. * @@ -9324,14 +9324,49 @@ static const char* apzFeraiseexcept_Nosse_DivbyzeroPatch[] = { # endif", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description of Complier_H_Tradcpp fix + */ +tSCC zComplier_H_TradcppName[] = + "complier_h_tradcpp"; + +/* + * File name selection pattern + */ +tSCC zComplier_H_TradcppList[] = + "linux/compiler.h\0"; +/* + * Machine/OS name selection pattern + */ +#define apzComplier_H_TradcppMachs (const char**)NULL + +/* + * content selection pattern - do fix if pattern found + */ +tSCC zComplier_H_TradcppSelect0[] = + "#define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\)"; + +#define COMPLIER_H_TRADCPP_TEST_CT 1 +static tTestDesc aComplier_H_TradcppTests[] = { + { TT_EGREP, zComplier_H_TradcppSelect0, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Complier_H_Tradcpp + */ +static const char* apzComplier_H_TradcppPatch[] = { + "format", + "/* __builtin_warning(x, y...) is obsolete */", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * List of all fixes */ -#define REGEX_COUNT 266 +#define REGEX_COUNT 267 #define MACH_LIST_SIZE_LIMIT 187 -#define FIX_COUNT 227 +#define FIX_COUNT 228 /* * Enumerate the fixes @@ -9563,7 +9598,8 @@ typedef enum { X11_NEW_FIXIDX, X11_SPRINTF_FIXIDX, FERAISEEXCEPT_NOSSE_INVALID_FIXIDX, - FERAISEEXCEPT_NOSSE_DIVBYZERO_FIXIDX + FERAISEEXCEPT_NOSSE_DIVBYZERO_FIXIDX, + COMPLIER_H_TRADCPP_FIXIDX } t_fixinc_idx; tFixDesc fixDescList[ FIX_COUNT ] = { @@ -10700,5 +10736,10 @@ tFixDesc fixDescList[ FIX_COUNT ] = { { zFeraiseexcept_Nosse_DivbyzeroName, zFeraiseexcept_Nosse_DivbyzeroList, apzFeraiseexcept_Nosse_DivbyzeroMachs, FERAISEEXCEPT_NOSSE_DIVBYZERO_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, - aFeraiseexcept_Nosse_DivbyzeroTests, apzFeraiseexcept_Nosse_DivbyzeroPatch, 0 } + aFeraiseexcept_Nosse_DivbyzeroTests, apzFeraiseexcept_Nosse_DivbyzeroPatch, 0 }, + + { zComplier_H_TradcppName, zComplier_H_TradcppList, + apzComplier_H_TradcppMachs, + COMPLIER_H_TRADCPP_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, + aComplier_H_TradcppTests, apzComplier_H_TradcppPatch, 0 } }; diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index d912ccc0cc6..42853da71b4 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -4894,4 +4894,18 @@ fix = { _EOText_; }; +/* + * Old Linux kernel's header breaks Traditional CPP + */ +fix = { + hackname = complier_h_tradcpp; + files = linux/compiler.h; + + select = "#define __builtin_warning\\(x, y\\.\\.\\.\\) \\(1\\)"; + c_fix = format; + c_fix_arg = "/* __builtin_warning(x, y...) is obsolete */"; + + test_text = "#define __builtin_warning(x, y...) (1)"; +}; + /*EOF*/