diff options
author | Mike Stump <mrs@apple.com> | 2004-11-01 19:01:15 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2004-11-01 19:01:15 +0000 |
commit | 40d05429503044c2cd3d10317ae1cff1b06d21ce (patch) | |
tree | 7c85ef93d3c444f71719615c6b86576ffd612241 /fixincludes/fixincl.x | |
parent | 9dc62c00e4474defce0b20cf17188f094f06f118 (diff) | |
download | gcc-40d05429503044c2cd3d10317ae1cff1b06d21ce.tar.gz |
inclhack.def (stdio_va_list): Break out clients from here...
* inclhack.def (stdio_va_list): Break out clients from here...
(stdio_va_list_clients): ...to here. Also, don't fix if stdarg.h is
included or ifdef va_start.
From-SVN: r89954
Diffstat (limited to 'fixincludes/fixincl.x')
-rw-r--r-- | fixincludes/fixincl.x | 68 |
1 files changed, 62 insertions, 6 deletions
diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index eff337673c3..9e6c3868e6c 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 Friday October 29, 2004 at 02:14:23 PM PDT + * It has been AutoGen-ed Friday October 29, 2004 at 02:26:49 PM PDT * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Oct 29 14:14:23 PDT 2004 +/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Oct 29 14:26:49 PDT 2004 * * 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 180 fixup descriptions. + * This file contains 181 fixup descriptions. * * See README for more information. * @@ -4916,7 +4916,7 @@ tSCC zStdio_Va_ListName[] = * File name selection pattern */ tSCC zStdio_Va_ListList[] = - "|stdio.h|internal/stdio_core.h|internal/wchar_core.h|com_err.h|cps.h|curses.h|krb5.h|lc_core.h|pfmt.h|wchar.h|curses_colr/curses.h|"; + "|stdio.h|internal/stdio_core.h|internal/wchar_core.h|"; /* * Machine/OS name selection pattern */ @@ -4954,6 +4954,56 @@ s@_Va_LIST@_VA_LIST@", /* * * * * * * * * * * * * * * * * * * * * * * * * * * + * Description of Stdio_Va_List_Clients fix + */ +tSCC zStdio_Va_List_ClientsName[] = + "stdio_va_list_clients"; + +/* + * File name selection pattern + */ +tSCC zStdio_Va_List_ClientsList[] = + "|com_err.h|cps.h|curses.h|krb5.h|lc_core.h|pfmt.h|wchar.h|curses_colr/curses.h|"; +/* + * Machine/OS name selection pattern + */ +#define apzStdio_Va_List_ClientsMachs (const char**)NULL + +/* + * content bypass pattern - skip fix if pattern found + */ +tSCC zStdio_Va_List_ClientsBypass0[] = + "__gnuc_va_list|_BSD_VA_LIST_|__DJ_va_list|_G_va_list"; +tSCC zStdio_Va_List_ClientsBypass1[] = + "include <stdarg\\.h>|#ifdef va_start"; + +#define STDIO_VA_LIST_CLIENTS_TEST_CT 2 +static tTestDesc aStdio_Va_List_ClientsTests[] = { + { TT_NEGREP, zStdio_Va_List_ClientsBypass0, (regex_t*)NULL }, + { TT_NEGREP, zStdio_Va_List_ClientsBypass1, (regex_t*)NULL }, }; + +/* + * Fix Command Arguments for Stdio_Va_List_Clients + */ +static const char* apzStdio_Va_List_ClientsPatch[] = { "sed", + "-e", "s@[ \t]va_list\\([ \t)]\\)@ __gnuc_va_list\\1@\n\ +s@(va_list)&@(__gnuc_va_list)\\&@\n\ +s@ _VA_LIST_));@ __gnuc_va_list));@\n\ +s@ __VA_LIST__));@ __gnuc_va_list));@\n\ +s@ va_list@ __not_va_list__@\n\ +s@\\*va_list@*__not_va_list__@\n\ +s@ __va_list)@ __gnuc_va_list)@\n\ +s@typedef[ \t]\\(.*\\)[ \t]va_list[ \t]*;@typedef \\1 __not_va_list__;@\n\ +s@typedef[ \t]*__va_list__@typedef __gnuc_va_list@\n\ +s@GNUC_VA_LIST@GNUC_Va_LIST@\n\ +s@_VA_LIST_DEFINED@_Va_LIST_DEFINED@\n\ +s@_NEED___VA_LIST@_NEED___Va_LIST@\n\ +s@VA_LIST@DUMMY_VA_LIST@\n\ +s@_Va_LIST@_VA_LIST@", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * * Description of Strict_Ansi_Not fix */ tSCC zStrict_Ansi_NotName[] = @@ -7146,9 +7196,9 @@ static const char* apzX11_SprintfPatch[] = { * * List of all fixes */ -#define REGEX_COUNT 204 +#define REGEX_COUNT 206 #define MACH_LIST_SIZE_LIMIT 261 -#define FIX_COUNT 180 +#define FIX_COUNT 181 /* * Enumerate the fixes @@ -7277,6 +7327,7 @@ typedef enum { STATSSWTCH_FIXIDX, STDIO_STDARG_H_FIXIDX, STDIO_VA_LIST_FIXIDX, + STDIO_VA_LIST_CLIENTS_FIXIDX, STRICT_ANSI_NOT_FIXIDX, STRICT_ANSI_NOT_CTD_FIXIDX, STRICT_ANSI_ONLY_FIXIDX, @@ -7952,6 +8003,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = { STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY, aStdio_Va_ListTests, apzStdio_Va_ListPatch, 0 }, + { zStdio_Va_List_ClientsName, zStdio_Va_List_ClientsList, + apzStdio_Va_List_ClientsMachs, + STDIO_VA_LIST_CLIENTS_TEST_CT, FD_MACH_ONLY, + aStdio_Va_List_ClientsTests, apzStdio_Va_List_ClientsPatch, 0 }, + { zStrict_Ansi_NotName, zStrict_Ansi_NotList, apzStrict_Ansi_NotMachs, STRICT_ANSI_NOT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE, |