mirror of
https://review.haiku-os.org/buildtools
synced 2025-01-18 12:28:37 +01:00
Patch by Samuel Rodriguez Perez to fix building this gcc version for FreeBSD.
The removed header fixes don't apply to the Haiku headers anyway, so this shouldn't be much of a problem. git-svn-id: file:///srv/svn/repos/haiku/buildtools/trunk@20046 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
e4766e1c34
commit
e938767ea3
@ -2,11 +2,11 @@
|
||||
*
|
||||
* DO NOT EDIT THIS FILE (fixincl.x)
|
||||
*
|
||||
* It has been AutoGen-ed Monday May 3, 2004 at 05:12:43 PM MEST
|
||||
* It has been AutoGen-ed Friday February 2, 2007 at 12:24:45 PM CET
|
||||
* From the definitions inclhack.def
|
||||
* and the template file fixincl
|
||||
*/
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Mon May 3 17:12:43 MEST 2004
|
||||
/* DO NOT CVS-MERGE THIS FILE, EITHER Fri Feb 2 12:24:45 CET 2007
|
||||
*
|
||||
* You must regenerate it. Use the ./genfixes script.
|
||||
*
|
||||
@ -15,18 +15,19 @@
|
||||
* 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 174 fixup descriptions.
|
||||
* This file contains 172 fixup descriptions.
|
||||
*
|
||||
* See README for more information.
|
||||
*
|
||||
* inclhack copyright (c) 1998, 1999, 2000, 2001
|
||||
* The Free Software Foundation, Inc.
|
||||
*
|
||||
* inclhack is free software.
|
||||
* inclhack is free software.
|
||||
*
|
||||
* You may redistribute it and/or modify it under the terms of the
|
||||
* GNU General Public License, as published by the Free Software
|
||||
* Foundation; either version 2, or (at your option) any later version.
|
||||
* Foundation; either version 2 of the License, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
* inclhack is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
@ -34,10 +35,10 @@
|
||||
* See the GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with inclhack. See the file "COPYING". If not,
|
||||
* write to: The Free Software Foundation, Inc.,
|
||||
* 59 Temple Place - Suite 330,
|
||||
* Boston, MA 02111-1307, USA.
|
||||
* along with inclhack. If not, write to:
|
||||
* The Free Software Foundation, Inc.,
|
||||
* 51 Franklin Street, Fifth Floor
|
||||
* Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
@ -2310,41 +2311,6 @@ static const char* apzHpux11_Size_TPatch[] = {
|
||||
"_hpux_size_t",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Hpux11_Snprintf fix
|
||||
*/
|
||||
tSCC zHpux11_SnprintfName[] =
|
||||
"hpux11_snprintf";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zHpux11_SnprintfList[] =
|
||||
"|stdio.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
#define apzHpux11_SnprintfMachs (const char**)NULL
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zHpux11_SnprintfSelect0[] =
|
||||
"(extern int snprintf *\\(char *\\*, *(|__|_hpux_)size_t,) *(char *\\*, *\\.\\.\\.\\);)";
|
||||
|
||||
#define HPUX11_SNPRINTF_TEST_CT 1
|
||||
static tTestDesc aHpux11_SnprintfTests[] = {
|
||||
{ TT_EGREP, zHpux11_SnprintfSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Hpux11_Snprintf
|
||||
*/
|
||||
static const char* apzHpux11_SnprintfPatch[] = {
|
||||
"format",
|
||||
"%1 const %3",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Hpux11_Uint32_C fix
|
||||
@ -4764,47 +4730,6 @@ static const char* apzStrict_Ansi_NotPatch[] = {
|
||||
"%1 !defined(__STRICT_ANSI__)",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Strict_Ansi_Not_Ctd fix
|
||||
*/
|
||||
tSCC zStrict_Ansi_Not_CtdName[] =
|
||||
"strict_ansi_not_ctd";
|
||||
|
||||
/*
|
||||
* File name selection pattern
|
||||
*/
|
||||
tSCC zStrict_Ansi_Not_CtdList[] =
|
||||
"|math.h|limits.h|stdio.h|signal.h|stdlib.h|sys/signal.h|time.h|";
|
||||
/*
|
||||
* Machine/OS name selection pattern
|
||||
*/
|
||||
#define apzStrict_Ansi_Not_CtdMachs (const char**)NULL
|
||||
|
||||
/*
|
||||
* content selection pattern - do fix if pattern found
|
||||
*/
|
||||
tSCC zStrict_Ansi_Not_CtdSelect0[] =
|
||||
"^([ \t]*(\\(|&&|\\|\\|)([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*[ \t(]*)(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
|
||||
|
||||
/*
|
||||
* perform the C function call test
|
||||
*/
|
||||
tSCC zStrict_Ansi_Not_CtdFTst0[] = "stdc_0_in_system_headers";
|
||||
|
||||
#define STRICT_ANSI_NOT_CTD_TEST_CT 2
|
||||
static tTestDesc aStrict_Ansi_Not_CtdTests[] = {
|
||||
{ TT_FUNCTION, zStrict_Ansi_Not_CtdFTst0, 0 /* unused */ },
|
||||
{ TT_EGREP, zStrict_Ansi_Not_CtdSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Strict_Ansi_Not_Ctd
|
||||
*/
|
||||
static const char* apzStrict_Ansi_Not_CtdPatch[] = {
|
||||
"format",
|
||||
"%1 !defined(__STRICT_ANSI__)",
|
||||
(char*)NULL };
|
||||
|
||||
/* * * * * * * * * * * * * * * * * * * * * * * * * *
|
||||
*
|
||||
* Description of Strict_Ansi_Only fix
|
||||
@ -6413,7 +6338,7 @@ tSCC zVa_I960_MacroSelect0[] =
|
||||
|
||||
#define VA_I960_MACRO_TEST_CT 1
|
||||
static tTestDesc aVa_I960_MacroTests[] = {
|
||||
{ TT_EGREP, zVa_I960_MacroSelect0, (regex_t*)NULL }, };
|
||||
{ TT_EGREP, zVa_I960_MacroSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Va_I960_Macro
|
||||
@ -6448,7 +6373,7 @@ tSCC zVoid_NullSelect0[] =
|
||||
|
||||
#define VOID_NULL_TEST_CT 1
|
||||
static tTestDesc aVoid_NullTests[] = {
|
||||
{ TT_EGREP, zVoid_NullSelect0, (regex_t*)NULL }, };
|
||||
{ TT_EGREP, zVoid_NullSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Void_Null
|
||||
@ -6483,7 +6408,7 @@ tSCC zVxworks_Gcc_ProblemSelect0[] =
|
||||
|
||||
#define VXWORKS_GCC_PROBLEM_TEST_CT 1
|
||||
static tTestDesc aVxworks_Gcc_ProblemTests[] = {
|
||||
{ TT_EGREP, zVxworks_Gcc_ProblemSelect0, (regex_t*)NULL }, };
|
||||
{ TT_EGREP, zVxworks_Gcc_ProblemSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vxworks_Gcc_Problem
|
||||
@ -6532,7 +6457,7 @@ tSCC zVxworks_Needs_VxtypesSelect0[] =
|
||||
|
||||
#define VXWORKS_NEEDS_VXTYPES_TEST_CT 1
|
||||
static tTestDesc aVxworks_Needs_VxtypesTests[] = {
|
||||
{ TT_EGREP, zVxworks_Needs_VxtypesSelect0, (regex_t*)NULL }, };
|
||||
{ TT_EGREP, zVxworks_Needs_VxtypesSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vxworks_Needs_Vxtypes
|
||||
@ -6577,10 +6502,10 @@ tSCC zVxworks_Needs_VxworksTest2[] =
|
||||
|
||||
#define VXWORKS_NEEDS_VXWORKS_TEST_CT 4
|
||||
static tTestDesc aVxworks_Needs_VxworksTests[] = {
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest0, 0 /* unused */ },
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest1, 0 /* unused */ },
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest2, 0 /* unused */ },
|
||||
{ TT_EGREP, zVxworks_Needs_VxworksSelect0, (regex_t*)NULL }, };
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest0, 0 /* unused */ },
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest1, 0 /* unused */ },
|
||||
{ TT_TEST, zVxworks_Needs_VxworksTest2, 0 /* unused */ },
|
||||
{ TT_EGREP, zVxworks_Needs_VxworksSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vxworks_Needs_Vxworks
|
||||
@ -6621,8 +6546,8 @@ tSCC zVxworks_TimeTest0[] =
|
||||
|
||||
#define VXWORKS_TIME_TEST_CT 2
|
||||
static tTestDesc aVxworks_TimeTests[] = {
|
||||
{ TT_TEST, zVxworks_TimeTest0, 0 /* unused */ },
|
||||
{ TT_EGREP, zVxworks_TimeSelect0, (regex_t*)NULL }, };
|
||||
{ TT_TEST, zVxworks_TimeTest0, 0 /* unused */ },
|
||||
{ TT_EGREP, zVxworks_TimeSelect0, (regex_t*)NULL }, };
|
||||
|
||||
/*
|
||||
* Fix Command Arguments for Vxworks_Time
|
||||
@ -6901,9 +6826,9 @@ static const char* apzX11_SprintfPatch[] = {
|
||||
*
|
||||
* List of all fixes
|
||||
*/
|
||||
#define REGEX_COUNT 196
|
||||
#define REGEX_COUNT 194
|
||||
#define MACH_LIST_SIZE_LIMIT 261
|
||||
#define FIX_COUNT 174
|
||||
#define FIX_COUNT 172
|
||||
|
||||
/*
|
||||
* Enumerate the fixes
|
||||
@ -6963,7 +6888,6 @@ typedef enum {
|
||||
HPUX11_ABS_FIXIDX,
|
||||
HPUX11_FABSF_FIXIDX,
|
||||
HPUX11_SIZE_T_FIXIDX,
|
||||
HPUX11_SNPRINTF_FIXIDX,
|
||||
HPUX11_UINT32_C_FIXIDX,
|
||||
HPUX11_VSNPRINTF_FIXIDX,
|
||||
HPUX8_BOGUS_INLINES_FIXIDX,
|
||||
@ -7027,7 +6951,6 @@ typedef enum {
|
||||
STDIO_STDARG_H_FIXIDX,
|
||||
STDIO_VA_LIST_FIXIDX,
|
||||
STRICT_ANSI_NOT_FIXIDX,
|
||||
STRICT_ANSI_NOT_CTD_FIXIDX,
|
||||
STRICT_ANSI_ONLY_FIXIDX,
|
||||
STRUCT_FILE_FIXIDX,
|
||||
STRUCT_SOCKADDR_FIXIDX,
|
||||
@ -7356,11 +7279,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
HPUX11_SIZE_T_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aHpux11_Size_TTests, apzHpux11_Size_TPatch, 0 },
|
||||
|
||||
{ zHpux11_SnprintfName, zHpux11_SnprintfList,
|
||||
apzHpux11_SnprintfMachs,
|
||||
HPUX11_SNPRINTF_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aHpux11_SnprintfTests, apzHpux11_SnprintfPatch, 0 },
|
||||
|
||||
{ zHpux11_Uint32_CName, zHpux11_Uint32_CList,
|
||||
apzHpux11_Uint32_CMachs,
|
||||
HPUX11_UINT32_C_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
@ -7676,11 +7594,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
|
||||
STRICT_ANSI_NOT_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aStrict_Ansi_NotTests, apzStrict_Ansi_NotPatch, 0 },
|
||||
|
||||
{ zStrict_Ansi_Not_CtdName, zStrict_Ansi_Not_CtdList,
|
||||
apzStrict_Ansi_Not_CtdMachs,
|
||||
STRICT_ANSI_NOT_CTD_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
aStrict_Ansi_Not_CtdTests, apzStrict_Ansi_Not_CtdPatch, 0 },
|
||||
|
||||
{ zStrict_Ansi_OnlyName, zStrict_Ansi_OnlyList,
|
||||
apzStrict_Ansi_OnlyMachs,
|
||||
STRICT_ANSI_ONLY_TEST_CT, FD_MACH_ONLY | FD_SUBROUTINE,
|
||||
|
@ -1315,25 +1315,6 @@ fix = {
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* Fix hpux 11.00 broken snprintf declaration
|
||||
* (third argument is char *, needs to be const char * to prevent
|
||||
* spurious warnings with -Wwrite-strings or in C++).
|
||||
*/
|
||||
fix = {
|
||||
hackname = hpux11_snprintf;
|
||||
files = stdio.h;
|
||||
select = '(extern int snprintf *\(char *\*, *(|__|_hpux_)size_t,)'
|
||||
' *(char *\*, *\.\.\.\);)';
|
||||
c_fix = format;
|
||||
c_fix_arg = '%1 const %3';
|
||||
|
||||
test_text = "extern int snprintf(char *, size_t, char *, ...);\n"
|
||||
"extern int snprintf(char *, __size_t, char *, ...);\n"
|
||||
"extern int snprintf(char *, _hpux_size_t, char *, ...);";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* In inttypes.h on HPUX 11, the use of __CONCAT__ in the definition
|
||||
* of UINT32_C has undefined behavior according to ISO/ANSI:
|
||||
@ -2652,40 +2633,6 @@ fix = {
|
||||
"\n#end-end-end-end-if :-)";
|
||||
};
|
||||
|
||||
/*
|
||||
* "__STDC__-0==0"
|
||||
* is "!defined( __STRICT_ANSI__ )" on continued #if-s
|
||||
*/
|
||||
fix = {
|
||||
hackname = strict_ansi_not_ctd;
|
||||
files = math.h, limits.h, stdio.h, signal.h,
|
||||
stdlib.h, sys/signal.h, time.h;
|
||||
/*
|
||||
* Starting at the beginning of a line, skip white space and
|
||||
* a leading "(" or "&&" or "||". One of those must be found.
|
||||
* Then, zero, one or more copies of a "defined(_FOO_BAR_) &&"
|
||||
* expression. If these are nested, then they must accumulate
|
||||
* because we won't match any closing parentheses. Finally,
|
||||
* after skipping over all that, we must then match our suspect
|
||||
* phrase: "__STDC__-0==0" with or without white space.
|
||||
*/
|
||||
select = "^([ \t]*" '(\(|&&|\|\|)'
|
||||
"([ \t(]*!*[ \t]*defined\\([a-zA-Z_0-9]+\\)[ \t]*[|&][|&])*"
|
||||
"[ \t(]*)"
|
||||
"(__STDC__[ \t]*(|-[ \t]*0[ \t]*)==[ \t]*0)";
|
||||
c_test = stdc_0_in_system_headers;
|
||||
|
||||
c_fix = format;
|
||||
c_fix_arg = "%1 !defined(__STRICT_ANSI__)";
|
||||
|
||||
test_text = "#if 1 && \\\\\n"
|
||||
"&& defined(mumbling) |& (__STDC__ - 0 == 0) \\\\\n"
|
||||
"( __STDC__ == 0 && !defined(_XOPEN_SOURCE) \\\\\n"
|
||||
"|| __STDC__ - 0 == 0 ) /* not std C */\n"
|
||||
"int foo;\n#endif";
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
* "__STDC__!=0" or "__STDC__==1" or "__STDC__-0==1"
|
||||
* is "defined( __STRICT_ANSI__ )"
|
||||
|
Loading…
Reference in New Issue
Block a user