Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
4c188026
Commit
4c188026
authored
Apr 30, 2000
by
Bruce Korb
Committed by
Bruce Korb
Apr 30, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added definitions needed by OSR5
From-SVN: r33556
parent
0ca4f243
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
572 additions
and
286 deletions
+572
-286
gcc/ChangeLog
+6
-0
gcc/fixinc/fixincl.x
+334
-172
gcc/fixinc/inclhack.def
+85
-54
gcc/fixinc/inclhack.sh
+147
-60
No files found.
gcc/ChangeLog
View file @
4c188026
2000
-
40
-
30
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
inclhack
.
def
:
Added
definitions
needed
by
OSR5
*
fixinc
/
inclhack
.
sh
:
regen
*
fixinc
/
fixincl
.
x
:
regen
2000
-
04
-
30
Richard
Henderson
<
rth
@cygnus
.
com
>
*
ifcvt
.
c
(
dead_or_predicable
)
:
Manually
squeeze
non
-
movable
notes
...
...
gcc/fixinc/fixincl.x
View file @
4c188026
...
...
@@ -5,7 +5,7 @@
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
*
* This file contains 11
3
fixup descriptions.
* This file contains 11
7
fixup descriptions.
*
* See README-fixinc for more information.
*
...
...
@@ -1319,46 +1319,9 @@ const char* apzEcd_CursorPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco5_Stat_Wrappers fix
*/
#define SCO5_STAT_WRAPPERS_FIXIDX 29
tSCC zSco5_Stat_WrappersName[] =
"sco5_stat_wrappers";
/*
* File name selection pattern
*/
tSCC zSco5_Stat_WrappersList[] =
"|sys/stat.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzSco5_Stat_WrappersMachs[] = {
"i*86-*-sco3.2v5*",
(const char*)NULL };
#define SCO5_STAT_WRAPPERS_TEST_CT 0
#define aSco5_Stat_WrappersTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Sco5_Stat_Wrappers
*/
const char* apzSco5_Stat_WrappersPatch[] = { "sed",
"-e", "/^static int[ \t]*[a-z]*stat(/i\\\n\
#ifdef __cplusplus\\\n\
extern \"C\"\\\n\
{\\\n\
#endif\\\n",
"-e", "/^}$/a\\\n\
#ifdef __cplusplus\\\n\
}\\\n\
#endif /* __cplusplus */\\\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Hp_Inline fix
*/
#define HP_INLINE_FIXIDX
30
#define HP_INLINE_FIXIDX
29
tSCC zHp_InlineName[] =
"hp_inline";
...
...
@@ -1394,7 +1357,7 @@ const char* apzHp_InlinePatch[] = { "sed",
*
* Description of Hp_Sysfile fix
*/
#define HP_SYSFILE_FIXIDX 3
1
#define HP_SYSFILE_FIXIDX 3
0
tSCC zHp_SysfileName[] =
"hp_sysfile";
...
...
@@ -1429,7 +1392,7 @@ const char* apzHp_SysfilePatch[] = { "sed",
*
* Description of Cxx_Unready fix
*/
#define CXX_UNREADY_FIXIDX 3
2
#define CXX_UNREADY_FIXIDX 3
1
tSCC zCxx_UnreadyName[] =
"cxx_unready";
...
...
@@ -1479,7 +1442,7 @@ extern \"C\" {\\\n\
*
* Description of Hpux_Maxint fix
*/
#define HPUX_MAXINT_FIXIDX 3
3
#define HPUX_MAXINT_FIXIDX 3
2
tSCC zHpux_MaxintName[] =
"hpux_maxint";
...
...
@@ -1509,7 +1472,7 @@ const char* apzHpux_MaxintPatch[] = { "sed",
*
* Description of Hpux_Systime fix
*/
#define HPUX_SYSTIME_FIXIDX 3
4
#define HPUX_SYSTIME_FIXIDX 3
3
tSCC zHpux_SystimeName[] =
"hpux_systime";
...
...
@@ -1544,7 +1507,7 @@ const char* apzHpux_SystimePatch[] = { "sed",
*
* Description of Hpux8_Bogus_Inlines fix
*/
#define HPUX8_BOGUS_INLINES_FIXIDX 3
5
#define HPUX8_BOGUS_INLINES_FIXIDX 3
4
tSCC zHpux8_Bogus_InlinesName[] =
"hpux8_bogus_inlines";
...
...
@@ -1582,7 +1545,7 @@ const char* apzHpux8_Bogus_InlinesPatch[] = { "sed",
*
* Description of Hpux11_Uint32_C fix
*/
#define HPUX11_UINT32_C_FIXIDX 3
6
#define HPUX11_UINT32_C_FIXIDX 3
5
tSCC zHpux11_Uint32_CName[] =
"hpux11_uint32_c";
...
...
@@ -1617,7 +1580,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed",
*
* Description of Isc_Omits_With_Stdc fix
*/
#define ISC_OMITS_WITH_STDC_FIXIDX 3
7
#define ISC_OMITS_WITH_STDC_FIXIDX 3
6
tSCC zIsc_Omits_With_StdcName[] =
"isc_omits_with_stdc";
...
...
@@ -1652,7 +1615,7 @@ const char* apzIsc_Omits_With_StdcPatch[] = { "sed",
*
* Description of Io_Use_Quotes fix
*/
#define IO_USE_QUOTES_FIXIDX 3
8
#define IO_USE_QUOTES_FIXIDX 3
7
tSCC zIo_Use_QuotesName[] =
"io_use_quotes";
...
...
@@ -1685,7 +1648,7 @@ const char* apzIo_Use_QuotesPatch[] = {"IO_use",
*
* Description of Io_Def_Quotes fix
*/
#define IO_DEF_QUOTES_FIXIDX 3
9
#define IO_DEF_QUOTES_FIXIDX 3
8
tSCC zIo_Def_QuotesName[] =
"io_def_quotes";
...
...
@@ -1718,7 +1681,7 @@ const char* apzIo_Def_QuotesPatch[] = {"IO_defn",
*
* Description of Ctrl_Use_Quotes fix
*/
#define CTRL_USE_QUOTES_FIXIDX
40
#define CTRL_USE_QUOTES_FIXIDX
39
tSCC zCtrl_Use_QuotesName[] =
"ctrl_use_quotes";
...
...
@@ -1751,7 +1714,7 @@ const char* apzCtrl_Use_QuotesPatch[] = {"CTRL_use",
*
* Description of Ctrl_Def_Quotes fix
*/
#define CTRL_DEF_QUOTES_FIXIDX 4
1
#define CTRL_DEF_QUOTES_FIXIDX 4
0
tSCC zCtrl_Def_QuotesName[] =
"ctrl_def_quotes";
...
...
@@ -1784,7 +1747,7 @@ const char* apzCtrl_Def_QuotesPatch[] = {"CTRL_defn",
*
* Description of Ip_Missing_Semi fix
*/
#define IP_MISSING_SEMI_FIXIDX 4
2
#define IP_MISSING_SEMI_FIXIDX 4
1
tSCC zIp_Missing_SemiName[] =
"ip_missing_semi";
...
...
@@ -1819,7 +1782,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
*
* Description of Irix_Multiline_Cmnt fix
*/
#define IRIX_MULTILINE_CMNT_FIXIDX 4
3
#define IRIX_MULTILINE_CMNT_FIXIDX 4
2
tSCC zIrix_Multiline_CmntName[] =
"irix_multiline_cmnt";
...
...
@@ -1847,7 +1810,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
*
* Description of Irix_Sockaddr fix
*/
#define IRIX_SOCKADDR_FIXIDX 4
4
#define IRIX_SOCKADDR_FIXIDX 4
3
tSCC zIrix_SockaddrName[] =
"irix_sockaddr";
...
...
@@ -1890,7 +1853,7 @@ struct sockaddr;\n",
*
* Description of Irix_Struct__File fix
*/
#define IRIX_STRUCT__FILE_FIXIDX 4
5
#define IRIX_STRUCT__FILE_FIXIDX 4
4
tSCC zIrix_Struct__FileName[] =
"irix_struct__file";
...
...
@@ -1918,7 +1881,7 @@ struct __file_s;\n",
*
* Description of Irix_Asm_Apostrophe fix
*/
#define IRIX_ASM_APOSTROPHE_FIXIDX 4
6
#define IRIX_ASM_APOSTROPHE_FIXIDX 4
5
tSCC zIrix_Asm_ApostropheName[] =
"irix_asm_apostrophe";
...
...
@@ -1953,7 +1916,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed",
*
* Description of Isc_Fmod fix
*/
#define ISC_FMOD_FIXIDX 4
7
#define ISC_FMOD_FIXIDX 4
6
tSCC zIsc_FmodName[] =
"isc_fmod";
...
...
@@ -1988,7 +1951,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
*
* Description of Motorola_Nested fix
*/
#define MOTOROLA_NESTED_FIXIDX 4
8
#define MOTOROLA_NESTED_FIXIDX 4
7
tSCC zMotorola_NestedName[] =
"motorola_nested";
...
...
@@ -2018,7 +1981,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
*
* Description of Isc_Sys_Limits fix
*/
#define ISC_SYS_LIMITS_FIXIDX 4
9
#define ISC_SYS_LIMITS_FIXIDX 4
8
tSCC zIsc_Sys_LimitsName[] =
"isc_sys_limits";
...
...
@@ -2054,7 +2017,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
*
* Description of Kandr_Concat fix
*/
#define KANDR_CONCAT_FIXIDX
50
#define KANDR_CONCAT_FIXIDX
49
tSCC zKandr_ConcatName[] =
"kandr_concat";
...
...
@@ -2089,7 +2052,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
*
* Description of Limits_Ifndefs fix
*/
#define LIMITS_IFNDEFS_FIXIDX 5
1
#define LIMITS_IFNDEFS_FIXIDX 5
0
tSCC zLimits_IfndefsName[] =
"limits_ifndefs";
...
...
@@ -2148,7 +2111,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
*
* Description of Lynx_Void_Int fix
*/
#define LYNX_VOID_INT_FIXIDX 5
2
#define LYNX_VOID_INT_FIXIDX 5
1
tSCC zLynx_Void_IntName[] =
"lynx_void_int";
...
...
@@ -2183,7 +2146,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
*
* Description of Lynxos_Fcntl_Proto fix
*/
#define LYNXOS_FCNTL_PROTO_FIXIDX 5
3
#define LYNXOS_FCNTL_PROTO_FIXIDX 5
2
tSCC zLynxos_Fcntl_ProtoName[] =
"lynxos_fcntl_proto";
...
...
@@ -2218,7 +2181,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed",
*
* Description of M88k_Bad_Hypot_Opt fix
*/
#define M88K_BAD_HYPOT_OPT_FIXIDX 5
4
#define M88K_BAD_HYPOT_OPT_FIXIDX 5
3
tSCC zM88k_Bad_Hypot_OptName[] =
"m88k_bad_hypot_opt";
...
...
@@ -2260,7 +2223,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
*
* Description of M88k_Bad_S_If fix
*/
#define M88K_BAD_S_IF_FIXIDX 5
5
#define M88K_BAD_S_IF_FIXIDX 5
4
tSCC zM88k_Bad_S_IfName[] =
"m88k_bad_s_if";
...
...
@@ -2298,7 +2261,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed",
*
* Description of M88k_Multi_Incl fix
*/
#define M88K_MULTI_INCL_FIXIDX 5
6
#define M88K_MULTI_INCL_FIXIDX 5
5
tSCC zM88k_Multi_InclName[] =
"m88k_multi_incl";
...
...
@@ -2340,7 +2303,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
*
* Description of Machine_Ansi_H_Va_List fix
*/
#define MACHINE_ANSI_H_VA_LIST_FIXIDX 5
7
#define MACHINE_ANSI_H_VA_LIST_FIXIDX 5
6
tSCC zMachine_Ansi_H_Va_ListName[] =
"machine_ansi_h_va_list";
...
...
@@ -2382,7 +2345,7 @@ const char* apzMachine_Ansi_H_Va_ListPatch[] = { "sed",
*
* Description of Machine_Name fix
*/
#define MACHINE_NAME_FIXIDX 5
8
#define MACHINE_NAME_FIXIDX 5
7
tSCC zMachine_NameName[] =
"machine_name";
...
...
@@ -2414,7 +2377,7 @@ const char* apzMachine_NamePatch[] = {"machine_name",
*
* Description of Math_Exception fix
*/
#define MATH_EXCEPTION_FIXIDX 5
9
#define MATH_EXCEPTION_FIXIDX 5
8
tSCC zMath_ExceptionName[] =
"math_exception";
...
...
@@ -2463,7 +2426,7 @@ const char* apzMath_ExceptionPatch[] = { "sed",
*
* Description of Math_Huge_Val_From_Dbl_Max fix
*/
#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX
60
#define MATH_HUGE_VAL_FROM_DBL_MAX_FIXIDX
59
tSCC zMath_Huge_Val_From_Dbl_MaxName[] =
"math_huge_val_from_dbl_max";
...
...
@@ -2510,7 +2473,7 @@ const char* apzMath_Huge_Val_From_Dbl_MaxPatch[] = { "sh", "-c",
*
* Description of Math_Huge_Val_Ifndef fix
*/
#define MATH_HUGE_VAL_IFNDEF_FIXIDX 6
1
#define MATH_HUGE_VAL_IFNDEF_FIXIDX 6
0
tSCC zMath_Huge_Val_IfndefName[] =
"math_huge_val_ifndef";
...
...
@@ -2548,7 +2511,7 @@ const char* apzMath_Huge_Val_IfndefPatch[] = { "sed",
*
* Description of Nested_Comment fix
*/
#define NESTED_COMMENT_FIXIDX 6
2
#define NESTED_COMMENT_FIXIDX 6
1
tSCC zNested_CommentName[] =
"nested_comment";
...
...
@@ -2575,7 +2538,7 @@ const char* apzNested_CommentPatch[] = { "sed",
*
* Description of News_Os_Recursion fix
*/
#define NEWS_OS_RECURSION_FIXIDX 6
3
#define NEWS_OS_RECURSION_FIXIDX 6
2
tSCC zNews_Os_RecursionName[] =
"news_os_recursion";
...
...
@@ -2613,7 +2576,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
*
* Description of Next_Math_Prefix fix
*/
#define NEXT_MATH_PREFIX_FIXIDX 6
4
#define NEXT_MATH_PREFIX_FIXIDX 6
3
tSCC zNext_Math_PrefixName[] =
"next_math_prefix";
...
...
@@ -2652,7 +2615,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
*
* Description of Next_Template fix
*/
#define NEXT_TEMPLATE_FIXIDX 6
5
#define NEXT_TEMPLATE_FIXIDX 6
4
tSCC zNext_TemplateName[] =
"next_template";
...
...
@@ -2688,7 +2651,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
*
* Description of Next_Volitile fix
*/
#define NEXT_VOLITILE_FIXIDX 6
6
#define NEXT_VOLITILE_FIXIDX 6
5
tSCC zNext_VolitileName[] =
"next_volitile";
...
...
@@ -2724,7 +2687,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
*
* Description of Next_Wait_Union fix
*/
#define NEXT_WAIT_UNION_FIXIDX 6
7
#define NEXT_WAIT_UNION_FIXIDX 6
6
tSCC zNext_Wait_UnionName[] =
"next_wait_union";
...
...
@@ -2759,7 +2722,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
*
* Description of Nodeent_Syntax fix
*/
#define NODEENT_SYNTAX_FIXIDX 6
8
#define NODEENT_SYNTAX_FIXIDX 6
7
tSCC zNodeent_SyntaxName[] =
"nodeent_syntax";
...
...
@@ -2786,7 +2749,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
*
* Description of Osf_Namespace_A fix
*/
#define OSF_NAMESPACE_A_FIXIDX 6
9
#define OSF_NAMESPACE_A_FIXIDX 6
8
tSCC zOsf_Namespace_AName[] =
"osf_namespace_a";
...
...
@@ -2832,7 +2795,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
*
* Description of Osf_Namespace_B fix
*/
#define OSF_NAMESPACE_B_FIXIDX
70
#define OSF_NAMESPACE_B_FIXIDX
69
tSCC zOsf_Namespace_BName[] =
"osf_namespace_b";
...
...
@@ -2879,7 +2842,7 @@ typedef __regmatch_t\tregmatch_t;\n",
*
* Description of Pthread_Page_Size fix
*/
#define PTHREAD_PAGE_SIZE_FIXIDX 7
1
#define PTHREAD_PAGE_SIZE_FIXIDX 7
0
tSCC zPthread_Page_SizeName[] =
"pthread_page_size";
...
...
@@ -2914,7 +2877,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
*
* Description of Read_Ret_Type fix
*/
#define READ_RET_TYPE_FIXIDX 7
2
#define READ_RET_TYPE_FIXIDX 7
1
tSCC zRead_Ret_TypeName[] =
"read_ret_type";
...
...
@@ -2950,7 +2913,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed",
*
* Description of Rs6000_Double fix
*/
#define RS6000_DOUBLE_FIXIDX 7
3
#define RS6000_DOUBLE_FIXIDX 7
2
tSCC zRs6000_DoubleName[] =
"rs6000_double";
...
...
@@ -2988,7 +2951,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
*
* Description of Rs6000_Fchmod fix
*/
#define RS6000_FCHMOD_FIXIDX 7
4
#define RS6000_FCHMOD_FIXIDX 7
3
tSCC zRs6000_FchmodName[] =
"rs6000_fchmod";
...
...
@@ -3023,7 +2986,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
*
* Description of Rs6000_Param fix
*/
#define RS6000_PARAM_FIXIDX 7
5
#define RS6000_PARAM_FIXIDX 7
4
tSCC zRs6000_ParamName[] =
"rs6000_param";
...
...
@@ -3056,9 +3019,126 @@ const char* apzRs6000_ParamPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco_Strict_Ansi fix
*/
#define SCO_STRICT_ANSI_FIXIDX 75
tSCC zSco_Strict_AnsiName[] =
"sco_strict_ansi";
/*
* File name selection pattern
*/
#define zSco_Strict_AnsiList (char*)NULL
/*
* Machine/OS name selection pattern
*/
tSCC* apzSco_Strict_AnsiMachs[] = {
"i?86-*-sco3.2*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSco_Strict_AnsiSelect0[] =
"^[ \t]*#[ \t]*if.*!__STDC__";
#define SCO_STRICT_ANSI_TEST_CT 1
tTestDesc aSco_Strict_AnsiTests[] = {
{ TT_EGREP, zSco_Strict_AnsiSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sco_Strict_Ansi
*/
const char* apzSco_Strict_AnsiPatch[] = { "sed",
"-e", "s/!__STDC__/!defined(__STRICT_ANSI__)/g",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco_Static_Func fix
*/
#define SCO_STATIC_FUNC_FIXIDX 76
tSCC zSco_Static_FuncName[] =
"sco_static_func";
/*
* File name selection pattern
*/
tSCC zSco_Static_FuncList[] =
"|sys/stat.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzSco_Static_FuncMachs[] = {
"i?86-*-sco3.2*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSco_Static_FuncSelect0[] =
"^static int";
#define SCO_STATIC_FUNC_TEST_CT 1
tTestDesc aSco_Static_FuncTests[] = {
{ TT_EGREP, zSco_Static_FuncSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sco_Static_Func
*/
const char* apzSco_Static_FuncPatch[] = { "sed",
"-e", "/^static int/i\\\n\
#if __cplusplus\\\n\
extern \"C\" {\\\n\
#endif /* __cplusplus */",
"-e", "/^}$/a\\\n\
#if __cplusplus\\\n\
}\\\n\
#endif /* __cplusplus */",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sco_Utime fix
*/
#define SCO_UTIME_FIXIDX 77
tSCC zSco_UtimeName[] =
"sco_utime";
/*
* File name selection pattern
*/
tSCC zSco_UtimeList[] =
"|sys/times.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzSco_UtimeMachs[] = {
"i?86-*-sco3.2v4*",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSco_UtimeSelect0[] =
"(const char *, struct utimbuf *);";
#define SCO_UTIME_TEST_CT 1
tTestDesc aSco_UtimeTests[] = {
{ TT_EGREP, zSco_UtimeSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sco_Utime
*/
const char* apzSco_UtimePatch[] = { "sed",
"-e", "s/(const char \\*, struct utimbuf \\*);/(const char *, const struct utimbuf *);/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sony_Include fix
*/
#define SONY_INCLUDE_FIXIDX 7
6
#define SONY_INCLUDE_FIXIDX 7
8
tSCC zSony_IncludeName[] =
"sony_include";
...
...
@@ -3093,7 +3173,7 @@ const char* apzSony_IncludePatch[] = { "sed",
*
* Description of Statsswtch fix
*/
#define STATSSWTCH_FIXIDX 7
7
#define STATSSWTCH_FIXIDX 7
9
tSCC zStatsswtchName[] =
"statsswtch";
...
...
@@ -3128,7 +3208,7 @@ const char* apzStatsswtchPatch[] = { "sed",
*
* Description of Stdio_Stdarg_H fix
*/
#define STDIO_STDARG_H_FIXIDX
78
#define STDIO_STDARG_H_FIXIDX
80
tSCC zStdio_Stdarg_HName[] =
"stdio_stdarg_h";
...
...
@@ -3165,7 +3245,7 @@ const char* apzStdio_Stdarg_HPatch[] = { "sed",
*
* Description of Stdio_Va_List fix
*/
#define STDIO_VA_LIST_FIXIDX
79
#define STDIO_VA_LIST_FIXIDX
81
tSCC zStdio_Va_ListName[] =
"stdio_va_list";
...
...
@@ -3208,9 +3288,49 @@ s@_Va_LIST@_VA_LIST@",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sun_Auth_Proto fix
*/
#define SUN_AUTH_PROTO_FIXIDX 82
tSCC zSun_Auth_ProtoName[] =
"sun_auth_proto";
/*
* File name selection pattern
*/
tSCC zSun_Auth_ProtoList[] =
"|rpc/auth.h|rpc/clnt.h|rpc/svc.h|rpc/xdr.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSun_Auth_ProtoMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSun_Auth_ProtoSelect0[] =
"\\(\\*[a-z][a-z_]*\\)\\(\\)";
#define SUN_AUTH_PROTO_TEST_CT 1
tTestDesc aSun_Auth_ProtoTests[] = {
{ TT_EGREP, zSun_Auth_ProtoSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sun_Auth_Proto
*/
const char* apzSun_Auth_ProtoPatch[] = { "sed",
"-e", "s/^\\(.*(\\*[a-z][a-z_]*)(\\)\\();.*\\)/\\\n\
#ifdef __cplusplus\\\n\
\\1...\\2\\\n\
#else\\\n\
\\1\\2\\\n\
#endif/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sun_Bogus_Ifdef fix
*/
#define SUN_BOGUS_IFDEF_FIXIDX 8
0
#define SUN_BOGUS_IFDEF_FIXIDX 8
3
tSCC zSun_Bogus_IfdefName[] =
"sun_bogus_ifdef";
...
...
@@ -3245,7 +3365,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
*
* Description of Sun_Bogus_Ifdef_Sun4c fix
*/
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 8
1
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 8
4
tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"sun_bogus_ifdef_sun4c";
...
...
@@ -3280,7 +3400,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
*
* Description of Sun_Catmacro fix
*/
#define SUN_CATMACRO_FIXIDX 8
2
#define SUN_CATMACRO_FIXIDX 8
5
tSCC zSun_CatmacroName[] =
"sun_catmacro";
...
...
@@ -3320,7 +3440,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
*
* Description of Sun_Malloc fix
*/
#define SUN_MALLOC_FIXIDX 8
3
#define SUN_MALLOC_FIXIDX 8
6
tSCC zSun_MallocName[] =
"sun_malloc";
...
...
@@ -3350,7 +3470,7 @@ const char* apzSun_MallocPatch[] = { "sed",
*
* Description of Sun_Rusers_Semi fix
*/
#define SUN_RUSERS_SEMI_FIXIDX 8
4
#define SUN_RUSERS_SEMI_FIXIDX 8
7
tSCC zSun_Rusers_SemiName[] =
"sun_rusers_semi";
...
...
@@ -3385,7 +3505,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
*
* Description of Sun_Signal fix
*/
#define SUN_SIGNAL_FIXIDX 8
5
#define SUN_SIGNAL_FIXIDX 8
8
tSCC zSun_SignalName[] =
"sun_signal";
...
...
@@ -3423,49 +3543,9 @@ void\t(*signal(...))(...);\\\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sun_Auth_Proto fix
*/
#define SUN_AUTH_PROTO_FIXIDX 86
tSCC zSun_Auth_ProtoName[] =
"sun_auth_proto";
/*
* File name selection pattern
*/
tSCC zSun_Auth_ProtoList[] =
"|rpc/auth.h|rpc/clnt.h|rpc/svc.h|rpc/xdr.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSun_Auth_ProtoMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSun_Auth_ProtoSelect0[] =
"\\(\\*[a-z][a-z_]*\\)\\(\\)";
#define SUN_AUTH_PROTO_TEST_CT 1
tTestDesc aSun_Auth_ProtoTests[] = {
{ TT_EGREP, zSun_Auth_ProtoSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Sun_Auth_Proto
*/
const char* apzSun_Auth_ProtoPatch[] = { "sed",
"-e", "s/^\\(.*(\\*[a-z][a-z_]*)(\\)\\();.*\\)/\\\n\
#ifdef __cplusplus\\\n\
\\1...\\2\\\n\
#else\\\n\
\\1\\2\\\n\
#endif/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Sunos_Matherr_Decl fix
*/
#define SUNOS_MATHERR_DECL_FIXIDX 8
7
#define SUNOS_MATHERR_DECL_FIXIDX 8
9
tSCC zSunos_Matherr_DeclName[] =
"sunos_matherr_decl";
...
...
@@ -3502,7 +3582,7 @@ struct exception;\n",
*
* Description of Sunos_Strlen fix
*/
#define SUNOS_STRLEN_FIXIDX
88
#define SUNOS_STRLEN_FIXIDX
90
tSCC zSunos_StrlenName[] =
"sunos_strlen";
...
...
@@ -3535,9 +3615,71 @@ const char* apzSunos_StrlenPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4_Getcwd fix
*/
#define SVR4_GETCWD_FIXIDX 91
tSCC zSvr4_GetcwdName[] =
"svr4_getcwd";
/*
* File name selection pattern
*/
tSCC zSvr4_GetcwdList[] =
"|stdlib.h|unistd.h|prototypes.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSvr4_GetcwdMachs (const char**)NULL
/*
* content selection pattern - do fix if pattern found
*/
tSCC zSvr4_GetcwdSelect0[] =
"getcwd\\(char \\*, int\\)";
#define SVR4_GETCWD_TEST_CT 1
tTestDesc aSvr4_GetcwdTests[] = {
{ TT_EGREP, zSvr4_GetcwdSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Svr4_Getcwd
*/
const char* apzSvr4_GetcwdPatch[] = { "sed",
"-e", "s/getcwd(char \\*, int)/getcwd(char *, size_t)/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Svr4_Profil fix
*/
#define SVR4_PROFIL_FIXIDX 92
tSCC zSvr4_ProfilName[] =
"svr4_profil";
/*
* File name selection pattern
*/
tSCC zSvr4_ProfilList[] =
"|stdlib.h|unistd.h|";
/*
* Machine/OS name selection pattern
*/
#define apzSvr4_ProfilMachs (const char**)NULL
#define SVR4_PROFIL_TEST_CT 0
#define aSvr4_ProfilTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Svr4_Profil
*/
const char* apzSvr4_ProfilPatch[] = { "sed",
"-e", "s/profil(unsigned short \\*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Systypes fix
*/
#define SYSTYPES_FIXIDX
89
#define SYSTYPES_FIXIDX
93
tSCC zSystypesName[] =
"systypes";
...
...
@@ -3596,7 +3738,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
*
* Description of Systypes_Stdlib_Size_T fix
*/
#define SYSTYPES_STDLIB_SIZE_T_FIXIDX 9
0
#define SYSTYPES_STDLIB_SIZE_T_FIXIDX 9
4
tSCC zSystypes_Stdlib_Size_TName[] =
"systypes_stdlib_size_t";
...
...
@@ -3642,7 +3784,7 @@ const char* apzSystypes_Stdlib_Size_TPatch[] = { "sed",
*
* Description of Sysv68_String fix
*/
#define SYSV68_STRING_FIXIDX 9
1
#define SYSV68_STRING_FIXIDX 9
5
tSCC zSysv68_StringName[] =
"sysv68_string";
...
...
@@ -3679,7 +3821,7 @@ extern unsigned int\\\n\
*
* Description of Sysz_Stdlib_For_Sun fix
*/
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 9
2
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 9
6
tSCC zSysz_Stdlib_For_SunName[] =
"sysz_stdlib_for_sun";
...
...
@@ -3712,7 +3854,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
*
* Description of Sysz_Stdtypes_For_Sun fix
*/
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 9
3
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 9
7
tSCC zSysz_Stdtypes_For_SunName[] =
"sysz_stdtypes_for_sun";
...
...
@@ -3753,7 +3895,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
*
* Description of Tinfo_Cplusplus fix
*/
#define TINFO_CPLUSPLUS_FIXIDX 9
4
#define TINFO_CPLUSPLUS_FIXIDX 9
8
tSCC zTinfo_CplusplusName[] =
"tinfo_cplusplus";
...
...
@@ -3788,7 +3930,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
*
* Description of Ultrix_Fix_Fixproto fix
*/
#define ULTRIX_FIX_FIXPROTO_FIXIDX 9
5
#define ULTRIX_FIX_FIXPROTO_FIXIDX 9
9
tSCC zUltrix_Fix_FixprotoName[] =
"ultrix_fix_fixproto";
...
...
@@ -3824,7 +3966,7 @@ struct utsname;\n",
*
* Description of Ultrix_Atof_Param fix
*/
#define ULTRIX_ATOF_PARAM_FIXIDX
96
#define ULTRIX_ATOF_PARAM_FIXIDX
100
tSCC zUltrix_Atof_ParamName[] =
"ultrix_atof_param";
...
...
@@ -3859,7 +4001,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed",
*
* Description of Ultrix_Const fix
*/
#define ULTRIX_CONST_FIXIDX
97
#define ULTRIX_CONST_FIXIDX
101
tSCC zUltrix_ConstName[] =
"ultrix_const";
...
...
@@ -3894,7 +4036,7 @@ const char* apzUltrix_ConstPatch[] = { "sed",
*
* Description of Ultrix_Ifdef fix
*/
#define ULTRIX_IFDEF_FIXIDX
98
#define ULTRIX_IFDEF_FIXIDX
102
tSCC zUltrix_IfdefName[] =
"ultrix_ifdef";
...
...
@@ -3929,7 +4071,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed",
*
* Description of Ultrix_Nested_Cmnt fix
*/
#define ULTRIX_NESTED_CMNT_FIXIDX
99
#define ULTRIX_NESTED_CMNT_FIXIDX
103
tSCC zUltrix_Nested_CmntName[] =
"ultrix_nested_cmnt";
...
...
@@ -3956,7 +4098,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed",
*
* Description of Ultrix_Static fix
*/
#define ULTRIX_STATIC_FIXIDX 10
0
#define ULTRIX_STATIC_FIXIDX 10
4
tSCC zUltrix_StaticName[] =
"ultrix_static";
...
...
@@ -3993,7 +4135,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
*
* Description of Undefine_Null fix
*/
#define UNDEFINE_NULL_FIXIDX 10
1
#define UNDEFINE_NULL_FIXIDX 10
5
tSCC zUndefine_NullName[] =
"undefine_null";
...
...
@@ -4035,7 +4177,7 @@ const char* apzUndefine_NullPatch[] = { "sed",
*
* Description of Unixware7_Byteorder_Fix fix
*/
#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 10
2
#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 10
6
tSCC zUnixware7_Byteorder_FixName[] =
"unixware7_byteorder_fix";
...
...
@@ -4078,7 +4220,7 @@ const char* apzUnixware7_Byteorder_FixPatch[] = { "sed",
*
* Description of Va_I960_Macro fix
*/
#define VA_I960_MACRO_FIXIDX 10
3
#define VA_I960_MACRO_FIXIDX 10
7
tSCC zVa_I960_MacroName[] =
"va_i960_macro";
...
...
@@ -4116,7 +4258,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
*
* Description of Void_Null fix
*/
#define VOID_NULL_FIXIDX 10
4
#define VOID_NULL_FIXIDX 10
8
tSCC zVoid_NullName[] =
"void_null";
...
...
@@ -4151,7 +4293,7 @@ const char* apzVoid_NullPatch[] = { "sed",
*
* Description of Vxworks_Gcc_Problem fix
*/
#define VXWORKS_GCC_PROBLEM_FIXIDX 10
5
#define VXWORKS_GCC_PROBLEM_FIXIDX 10
9
tSCC zVxworks_Gcc_ProblemName[] =
"vxworks_gcc_problem";
...
...
@@ -4201,7 +4343,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
*
* Description of Vxworks_Needs_Vxtypes fix
*/
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 1
06
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 1
10
tSCC zVxworks_Needs_VxtypesName[] =
"vxworks_needs_vxtypes";
...
...
@@ -4236,7 +4378,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
*
* Description of Vxworks_Needs_Vxworks fix
*/
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 1
07
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 1
11
tSCC zVxworks_Needs_VxworksName[] =
"vxworks_needs_vxworks";
...
...
@@ -4285,7 +4427,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
*
* Description of Vxworks_Time fix
*/
#define VXWORKS_TIME_FIXIDX 1
08
#define VXWORKS_TIME_FIXIDX 1
12
tSCC zVxworks_TimeName[] =
"vxworks_time";
...
...
@@ -4336,7 +4478,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
*
* Description of X11_Class fix
*/
#define X11_CLASS_FIXIDX 1
09
#define X11_CLASS_FIXIDX 1
13
tSCC zX11_ClassName[] =
"x11_class";
...
...
@@ -4376,7 +4518,7 @@ const char* apzX11_ClassPatch[] = { "sed",
*
* Description of X11_Class_Usage fix
*/
#define X11_CLASS_USAGE_FIXIDX 11
0
#define X11_CLASS_USAGE_FIXIDX 11
4
tSCC zX11_Class_UsageName[] =
"x11_class_usage";
...
...
@@ -4411,7 +4553,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
*
* Description of X11_New fix
*/
#define X11_NEW_FIXIDX 11
1
#define X11_NEW_FIXIDX 11
5
tSCC zX11_NewName[] =
"x11_new";
...
...
@@ -4452,7 +4594,7 @@ const char* apzX11_NewPatch[] = { "sed",
*
* Description of X11_Sprintf fix
*/
#define X11_SPRINTF_FIXIDX 11
2
#define X11_SPRINTF_FIXIDX 11
6
tSCC zX11_SprintfName[] =
"x11_sprintf";
...
...
@@ -4490,9 +4632,9 @@ extern char *\tsprintf();\\\n\
*
* List of all fixes
*/
#define REGEX_COUNT
98
#define REGEX_COUNT
102
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 11
3
#define FIX_COUNT 11
7
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
...
...
@@ -4640,11 +4782,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
ECD_CURSOR_TEST_CT, FD_MACH_ONLY,
aEcd_CursorTests, apzEcd_CursorPatch },
{ zSco5_Stat_WrappersName, zSco5_Stat_WrappersList,
apzSco5_Stat_WrappersMachs, (regex_t*)NULL,
SCO5_STAT_WRAPPERS_TEST_CT, FD_MACH_ONLY,
aSco5_Stat_WrappersTests, apzSco5_Stat_WrappersPatch },
{ zHp_InlineName, zHp_InlineList,
apzHp_InlineMachs, (regex_t*)NULL,
HP_INLINE_TEST_CT, FD_MACH_ONLY,
...
...
@@ -4875,6 +5012,21 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
RS6000_PARAM_TEST_CT, FD_MACH_ONLY,
aRs6000_ParamTests, apzRs6000_ParamPatch },
{ zSco_Strict_AnsiName, zSco_Strict_AnsiList,
apzSco_Strict_AnsiMachs, (regex_t*)NULL,
SCO_STRICT_ANSI_TEST_CT, FD_MACH_ONLY,
aSco_Strict_AnsiTests, apzSco_Strict_AnsiPatch },
{ zSco_Static_FuncName, zSco_Static_FuncList,
apzSco_Static_FuncMachs, (regex_t*)NULL,
SCO_STATIC_FUNC_TEST_CT, FD_MACH_ONLY,
aSco_Static_FuncTests, apzSco_Static_FuncPatch },
{ zSco_UtimeName, zSco_UtimeList,
apzSco_UtimeMachs, (regex_t*)NULL,
SCO_UTIME_TEST_CT, FD_MACH_ONLY,
aSco_UtimeTests, apzSco_UtimePatch },
{ zSony_IncludeName, zSony_IncludeList,
apzSony_IncludeMachs, (regex_t*)NULL,
SONY_INCLUDE_TEST_CT, FD_MACH_ONLY,
...
...
@@ -4895,6 +5047,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
STDIO_VA_LIST_TEST_CT, FD_MACH_ONLY,
aStdio_Va_ListTests, apzStdio_Va_ListPatch },
{ zSun_Auth_ProtoName, zSun_Auth_ProtoList,
apzSun_Auth_ProtoMachs, (regex_t*)NULL,
SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY,
aSun_Auth_ProtoTests, apzSun_Auth_ProtoPatch },
{ zSun_Bogus_IfdefName, zSun_Bogus_IfdefList,
apzSun_Bogus_IfdefMachs, (regex_t*)NULL,
SUN_BOGUS_IFDEF_TEST_CT, FD_MACH_ONLY,
...
...
@@ -4925,11 +5082,6 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUN_SIGNAL_TEST_CT, FD_MACH_ONLY,
aSun_SignalTests, apzSun_SignalPatch },
{ zSun_Auth_ProtoName, zSun_Auth_ProtoList,
apzSun_Auth_ProtoMachs, (regex_t*)NULL,
SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY,
aSun_Auth_ProtoTests, apzSun_Auth_ProtoPatch },
{ zSunos_Matherr_DeclName, zSunos_Matherr_DeclList,
apzSunos_Matherr_DeclMachs, (regex_t*)NULL,
SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY,
...
...
@@ -4940,6 +5092,16 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
SUNOS_STRLEN_TEST_CT, FD_MACH_ONLY,
aSunos_StrlenTests, apzSunos_StrlenPatch },
{ zSvr4_GetcwdName, zSvr4_GetcwdList,
apzSvr4_GetcwdMachs, (regex_t*)NULL,
SVR4_GETCWD_TEST_CT, FD_MACH_ONLY,
aSvr4_GetcwdTests, apzSvr4_GetcwdPatch },
{ zSvr4_ProfilName, zSvr4_ProfilList,
apzSvr4_ProfilMachs, (regex_t*)NULL,
SVR4_PROFIL_TEST_CT, FD_MACH_ONLY,
aSvr4_ProfilTests, apzSvr4_ProfilPatch },
{ zSystypesName, zSystypesList,
apzSystypesMachs, (regex_t*)NULL,
SYSTYPES_TEST_CT, FD_MACH_ONLY,
...
...
gcc/fixinc/inclhack.def
View file @
4c188026
...
...
@@ -791,28 +791,6 @@ fix = {
};
/*
* On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
* tiny static wrappers that aren't C++ safe.
*/
fix = {
hackname = sco5_stat_wrappers;
mach = "i*86-*-sco3.2v5*";
files = "sys/stat.h";
sed = "/^static int[ \t]*[a-z]*stat(/i\\\n"
"#ifdef __cplusplus\\\n"
"extern \"C\"\\\n"
"{\\\n"
"#endif\\\n";
sed = "/^}$/a\\\n"
"#ifdef __cplusplus\\\n"
"}\\\n"
"#endif \/* __cplusplus *\/\\\n";
};
#ifdef OLD_CPP
/*
* Fix else and endif directives that contain non-commentary text
...
...
@@ -904,6 +882,7 @@ fix = {
sed = "s/^extern struct sigevent;/struct sigevent;/";
};
/*
* get rid of bogus inline definitions in HP-UX 8.0
*/
...
...
@@ -1540,6 +1519,56 @@ fix = {
/*
* "!__STDC__" is "!defined( __STRICT_ANSI__ )"
*/
fix = {
hackname = sco_strict_ansi;
mach = "i?86-*-sco3.2*";
select = "^[ \t]*#[ \t]*if.*!__STDC__";
sed = 's/!__STDC__/!defined(__STRICT_ANSI__)/g';
};
/*
* The static functions lstat() and fchmod() in <sys/stat.h>
* cause G++ grief since they're not wrapped in "if __cplusplus".
*
* On SCO OpenServer 5.0.0 through (at least) 5.0.5 <sys/stat.h> contains
* tiny static wrappers that aren't C++ safe.
*/
fix = {
hackname = sco_static_func;
files = sys/stat.h;
mach = "i?86-*-sco3.2*";
select = "^static int";
sed = "/^static int/i\\\n"
"#if __cplusplus\\\n"
"extern \"C\" {\\\n"
"#endif /* __cplusplus */";
sed = "/^}$/a\\\n"
"#if __cplusplus\\\n"
" }\\\n"
"#endif /* __cplusplus */";
};
/*
* Fix prototype declaration of utime in sys/times.h.
* In 3.2v4.0 the const is missing.
*/
fix = {
hackname = sco_utime;
files = sys/times.h;
mach = "i?86-*-sco3.2v4*";
select = "\(const char \*, struct utimbuf \*\);";
sed = 's/(const char \*, struct utimbuf \*);/'
'(const char *, const struct utimbuf *);/';
};
/*
* Sony NEWSOS 5.0 does not support the complete ANSI C standard.
*/
#ifdef SONY
...
...
@@ -1673,6 +1702,33 @@ fix = {
};
#endif
/*
* Apply fix this to all OSs since this problem seems to effect
* more than just SunOS.
*/
fix = {
hackname = sun_auth_proto;
files = rpc/auth.h;
files = rpc/clnt.h;
files = rpc/svc.h;
files = rpc/xdr.h;
/*
* Select those files containing '(*name)()'.
*/
select = '\(\*[a-z][a-z_]*\)\(\)';
sed = 's'
'/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
"/\\\n"
"#ifdef __cplusplus\\\n"
'\1...\2' "\\\n"
"#else\\\n"
'\1\2' "\\\n"
"#endif"
"/";
};
/*
* Fix bogus #ifdef on SunOS 4.1.
*/
...
...
@@ -1760,33 +1816,6 @@ fix = {
/*
* Apply fix this to all OSs since this problem seems to effect
* more than just SunOS. In general, fixes which are triggered
* by a specific target are bad.
*/
fix = {
hackname = sun_auth_proto;
files = rpc/auth.h;
files = rpc/clnt.h;
files = rpc/svc.h;
files = rpc/xdr.h;
/*
* Select those files containing '(*name)()'.
*/
select = '\(\*[a-z][a-z_]*\)\(\)';
sed = 's'
'/^\(.*(\*[a-z][a-z_]*)(\)' '\();.*\)'
"/\\\n"
"#ifdef __cplusplus\\\n"
'\1...\2' "\\\n"
"#else\\\n"
'\1\2' "\\\n"
"#endif"
"/";
};
/*
* math.h on SunOS 4 puts the declaration of matherr before the definition
* of struct exception, so the prototype (added by fixproto) causes havoc.
*/
...
...
@@ -1943,16 +1972,16 @@ fix = {
/*
* Fix broken decl of getcwd present on some svr4 systems.
*/
#ifdef SVR4
fix = {
hackname = svr4_getcwd;
files = stdlib.h;
files = unistd.h;
files = prototypes.h;
select = 'getcwd\(char \*, int\)';
sed = 's/getcwd(char \*, int)/getcwd(char *, size_t)/';
};
#endif
/*
* set ifdef _KERNEL
...
...
@@ -2034,10 +2063,10 @@ fix = {
};
#endif
/*
* Fix broken decl of profil present on some svr4 systems.
*/
#ifdef SVR4
fix = {
hackname = svr4_profil;
files = stdlib.h;
...
...
@@ -2047,7 +2076,7 @@ fix = {
'unsigned int, unsigned int)'
'/profil(unsigned short *, size_t, int, unsigned)/';
};
#endif
/*
* Convert functions to prototype form, and fix arg names in <sys/stat.h>.
...
...
@@ -2143,7 +2172,9 @@ fix = {
};
#endif /* SVR5 */
/* Fix these files to use the same types that we think they should.
/*
* Fix these files to use the same types that we think they should.
* XXX - extremely dubious changes here.
*/
fix = {
...
...
gcc/fixinc/inclhack.sh
View file @
4c188026
...
...
@@ -6,7 +6,7 @@
# files which are fixed to work correctly with ANSI C and placed in a
# directory that GNU C will search.
#
# This script contains 11
3
fixup scripts.
# This script contains 11
7
fixup scripts.
#
# See README-fixinc for more information.
#
...
...
@@ -1283,37 +1283,6 @@ struct rusage;
#
# Fix Sco5_Stat_Wrappers
#
case
"
${
file
}
"
in
./sys/stat.h
)
case
"
$target_canonical
"
in
i
*
86-
*
-sco3
.2v5
*
)
fixlist
=
"
${
fixlist
}
sco5_stat_wrappers"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^static int[ ]*[a-z]*stat(/i\
#ifdef __cplusplus\
extern "C"\
{\
#endif\
'
\
-e
'/^}$/a\
#ifdef __cplusplus\
}\
#endif /* __cplusplus */\
'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Hp_Inline
#
case
"
${
file
}
"
in
./sys/spinlock.h
)
...
...
@@ -2426,6 +2395,82 @@ typedef __regmatch_t regmatch_t;
#
# Fix Sco_Strict_Ansi
#
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2
*
)
if
(
test
-n
"
`
egrep
'^[ ]*#[ ]*if.*!__STDC__'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_strict_ansi"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/!__STDC__/!defined(__STRICT_ANSI__)/g'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
#
# Fix Sco_Static_Func
#
case
"
${
file
}
"
in
./sys/stat.h
)
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2
*
)
if
(
test
-n
"
`
egrep
'^static int'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_static_func"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^static int/i\
#if __cplusplus\
extern "C" {\
#endif /* __cplusplus */'
\
-e
'/^}$/a\
#if __cplusplus\
}\
#endif /* __cplusplus */'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Sco_Utime
#
case
"
${
file
}
"
in
./sys/times.h
)
case
"
$target_canonical
"
in
i?86-
*
-sco3
.2v4
*
)
if
(
test
-n
"
`
egrep
'(const char *, struct utimbuf *);'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sco_utime"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/(const char \*, struct utimbuf \*);/(const char *, const struct utimbuf *);/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for machine type test
esac
;;
# case end for file name test
esac
#
# Fix Sony_Include
#
case
"
${
file
}
"
in
./machine/machparam.h
)
...
...
@@ -2523,6 +2568,35 @@ s@_Va_LIST@_VA_LIST@' \
#
# Fix Sun_Auth_Proto
#
case
"
${
file
}
"
in
./rpc/auth.h
|
\
./rpc/clnt.h
|
\
./rpc/svc.h
|
\
./rpc/xdr.h
)
if
(
test
-n
"
`
egrep
'\\(\\*[a-z][a-z_]*\\)\\(\\)'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sun_auth_proto"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/^\(.*(\*[a-z][a-z_]*)(\)\();.*\)/\
#ifdef __cplusplus\
\1...\2\
#else\
\1\2\
#endif/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of select 'if'
;;
# case end for file name test
esac
#
# Fix Sun_Bogus_Ifdef
#
case
"
${
file
}
"
in
./hsfs/hsfs_spec.h
|
\
...
...
@@ -2665,71 +2739,65 @@ void (*signal(...))(...);\
#
# Fix Sun
_Auth_Proto
# Fix Sun
os_Matherr_Decl
#
case
"
${
file
}
"
in
./rpc/auth.h
|
\
./rpc/clnt.h
|
\
./rpc/svc.h
|
\
./rpc/xdr.h
)
if
(
test
-n
"
`
egrep
'\\(\\*[a-z][a-z_]*\\)\\(\\)'
${
file
}
`
"
case
"
${
file
}
"
in
./math.h
)
if
(
test
-z
"
`
egrep
'matherr.*struct exception'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sun
_auth_proto
"
sun
os_matherr_decl
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/^\(.*(\*[a-z][a-z_]*)(\)\();.*\)/\
#ifdef __cplusplus\
\1...\2\
#else\
\1\2\
#endif/'
\
sed
-e
'/^struct exception/,$b'
\
-e
'/matherr/i\
struct exception;
'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of
select
'if'
fi
# end of
bypass
'if'
;;
# case end for file name test
esac
#
# Fix Sunos_
Matherr_Decl
# Fix Sunos_
Strlen
#
case
"
${
file
}
"
in
./
math
.h
)
if
(
test
-
z
"
`
egrep
'matherr.*struct exceptio
n'
${
file
}
`
"
case
"
${
file
}
"
in
./
strings
.h
)
if
(
test
-
n
"
`
egrep
'int[ ]*strle
n'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
sunos_
matherr_decl
"
sunos_
strlen
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
'/^struct exception/,$b'
\
-e
'/matherr/i\
struct exception;
'
\
sed
-e
's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
fi
# end of
bypass
'if'
fi
# end of
select
'if'
;;
# case end for file name test
esac
#
# Fix S
unos_Strlen
# Fix S
vr4_Getcwd
#
case
"
${
file
}
"
in
./strings.h
)
if
(
test
-n
"
`
egrep
'int[ ]*strlen'
${
file
}
`
"
case
"
${
file
}
"
in
./stdlib.h
|
\
./unistd.h
|
\
./prototypes.h
)
if
(
test
-n
"
`
egrep
'getcwd\\(char \\*, int\\)'
${
file
}
`
"
)
>
/dev/null 2>&1
;
then
fixlist
=
"
${
fixlist
}
s
unos_strlen
"
s
vr4_getcwd
"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/
int[ ]*strlen();/__SIZE_TYPE__ strlen();
/'
\
sed
-e
's/
getcwd(char \*, int)/getcwd(char *, size_t)
/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
...
...
@@ -2739,6 +2807,25 @@ struct exception;
#
# Fix Svr4_Profil
#
case
"
${
file
}
"
in
./stdlib.h
|
\
./unistd.h
)
fixlist
=
"
${
fixlist
}
svr4_profil"
if
[
!
-r
${
DESTFILE
}
]
then
infile
=
${
file
}
else
infile
=
${
DESTFILE
}
;
fi
sed
-e
's/profil(unsigned short \*, unsigned int, unsigned int, unsigned int)/profil(unsigned short *, size_t, int, unsigned)/'
\
<
$infile
>
${
DESTDIR
}
/fixinc.tmp
rm
-f
${
DESTFILE
}
mv
-f
${
DESTDIR
}
/fixinc.tmp
${
DESTFILE
}
;;
# case end for file name test
esac
#
# Fix Systypes
#
case
"
${
file
}
"
in
./sys/types.h
|
\
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment