Commit 86765ca0 by Robert Lipe Committed by Bruce Korb

SVR5 Byteorder fixes

Co-Authored-By: Bruce Korb <autogen@linuxbox.com>

From-SVN: r30538
parent e1459ff8
1999-11-15 Robert Lipe <RobertLipe@usa.net>
Bruce Korb <autogen@linuxbox.com>
* fixinc/inclhack.def
(AAB_svr4_replace_byteorder): added. Takes advantage of GCC features
(unixware7_byteorder_fix): added. Removes conflicts for new defs
in net/inet.h.
(svr5_mach_defines): added. Like svr4_mach_defines, with new syntax
(svr4_endian): enabled with SVR5
(svr4_mkdev): simplified syntax and enabled with SVR5
Sun Nov 14 18:49:37 1999 David O'Brien <obrien@FreeBSD.org>
* configure.in: Handle libgcc2 threads support on FreeBSD platforms.
......
......@@ -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 107 fixup scripts.
# This script contains 109 fixup scripts.
#
# See README-fixinc for more information.
#
......
......@@ -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 107 fixup descriptions.
* This file contains 109 fixup descriptions.
*
* See README-fixinc for more information.
*
......@@ -313,9 +313,183 @@ typedef char * va_list;\n\
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aab_Svr4_Replace_Byteorder fix
*/
#define AAB_SVR4_REPLACE_BYTEORDER_FIXIDX 7
tSCC zAab_Svr4_Replace_ByteorderName[] =
"Aab_Svr4_Replace_Byteorder";
/*
* File name selection pattern
*/
tSCC zAab_Svr4_Replace_ByteorderList[] =
"|sys/byteorder.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzAab_Svr4_Replace_ByteorderMachs[] = {
"*-*-sysv4*",
"i[34567]86-*-sysv5*",
"i[34567]86-*-udk*",
"i[34567]86-*-solaris2.[0-4]",
"powerpcle-*-solaris2.[0-4]",
"sparc-*-solaris2.[0-4]",
(const char*)NULL };
#define AAB_SVR4_REPLACE_BYTEORDER_TEST_CT 0
#define AAB_SVR4_REPLACE_BYTEORDER_RE_CT 0
#define aAab_Svr4_Replace_ByteorderTests (tTestDesc*)NULL
/*
* Fix Command Arguments for Aab_Svr4_Replace_Byteorder
*/
const char* apzAab_Svr4_Replace_ByteorderPatch[] = {
"#ifndef _SYS_BYTEORDER_H\n\
#define _SYS_BYTEORDER_H\n\
\n\
/* Functions to convert `short' and `long' quantities from host byte order\n\
to (internet) network byte order (i.e. big-endian).\n\
\n\
Written by Ron Guilmette (rfg@ncd.com).\n\
\n\
This isn't actually used by GCC. It is installed by fixinc.svr4.\n\
\n\
For big-endian machines these functions are essentially no-ops.\n\
\n\
For little-endian machines, we define the functions using specialized\n\
asm sequences in cases where doing so yields better code (e.g. i386). */\n\
\n\
#if !defined (__GNUC__) && !defined (__GNUG__)\n\
#error You lose! This file is only useful with GNU compilers.\n\
#endif\n\
\n\
#ifndef __BYTE_ORDER__\n\
/* Byte order defines. These are as defined on UnixWare 1.1, but with\n\
double underscores added at the front and back. */\n\
#define __LITTLE_ENDIAN__ 1234\n\
#define __BIG_ENDIAN__ 4321\n\
#define __PDP_ENDIAN__ 3412\n\
#endif\n\
\n\
#ifdef __STDC__\n\
static __inline__ unsigned long htonl (unsigned long);\n\
static __inline__ unsigned short htons (unsigned int);\n\
static __inline__ unsigned long ntohl (unsigned long);\n\
static __inline__ unsigned short ntohs (unsigned int);\n\
#endif /* defined (__STDC__) */\n\
\n\
#if defined (__i386__)\n\
\n\
#ifndef __BYTE_ORDER__\n\
#define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\
#endif\n\
\n\
/* Convert a host long to a network long. */\n\
\n\
/* We must use a new-style function definition, so that this will also\n\
be valid for C++. */\n\
static __inline__ unsigned long\n\
htonl (unsigned long __arg)\n\
{\n\
register unsigned long __result;\n\
\n\
__asm__ (\"xchg%B0 %b0,%h0\n\
\tror%L0 $16,%0\n\
\txchg%B0 %b0,%h0\" : \"=q\" (__result) : \"0\" (__arg));\n\
return __result;\n\
}\n\
\n\
/* Convert a host short to a network short. */\n\
\n\
static __inline__ unsigned short\n\
htons (unsigned int __arg)\n\
{\n\
register unsigned short __result;\n\
\n\
__asm__ (\"xchg%B0 %b0,%h0\" : \"=q\" (__result) : \"0\" (__arg));\n\
return __result;\n\
}\n\
\n\
#elif ((defined (__i860__) && !defined (__i860_big_endian__))\t || defined (__ns32k__) || defined (__vax__)\t\t || defined (__spur__) || defined (__arm__))\n\
\n\
#ifndef __BYTE_ORDER__\n\
#define __BYTE_ORDER__ __LITTLE_ENDIAN__\n\
#endif\n\
\n\
/* For other little-endian machines, using C code is just as efficient as\n\
using assembly code. */\n\
\n\
/* Convert a host long to a network long. */\n\
\n\
static __inline__ unsigned long\n\
htonl (unsigned long __arg)\n\
{\n\
register unsigned long __result;\n\
\n\
__result = (__arg >> 24) & 0x000000ff;\n\
__result |= (__arg >> 8) & 0x0000ff00;\n\
__result |= (__arg << 8) & 0x00ff0000;\n\
__result |= (__arg << 24) & 0xff000000;\n\
return __result;\n\
}\n\
\n\
/* Convert a host short to a network short. */\n\
\n\
static __inline__ unsigned short\n\
htons (unsigned int __arg)\n\
{\n\
register unsigned short __result;\n\
\n\
__result = (__arg << 8) & 0xff00;\n\
__result |= (__arg >> 8) & 0x00ff;\n\
return __result;\n\
}\n\
\n\
#else /* must be a big-endian machine */\n\
\n\
#ifndef __BYTE_ORDER__\n\
#define __BYTE_ORDER__ __BIG_ENDIAN__\n\
#endif\n\
\n\
/* Convert a host long to a network long. */\n\
\n\
static __inline__ unsigned long\n\
htonl (unsigned long __arg)\n\
{\n\
return __arg;\n\
}\n\
\n\
/* Convert a host short to a network short. */\n\
\n\
static __inline__ unsigned short\n\
htons (unsigned int __arg)\n\
{\n\
return __arg;\n\
}\n\
\n\
#endif /* big-endian */\n\
\n\
/* Convert a network long to a host long. */\n\
\n\
static __inline__ unsigned long\n\
ntohl (unsigned long __arg)\n\
{\n\
return htonl (__arg);\n\
}\n\
\n\
/* Convert a network short to a host short. */\n\
\n\
static __inline__ unsigned short\n\
ntohs (unsigned int __arg)\n\
{\n\
return htons (__arg);\n\
}\n\
#endif\n",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Aix_Syswait fix
*/
#define AIX_SYSWAIT_FIXIDX 7
#define AIX_SYSWAIT_FIXIDX 8
tSCC zAix_SyswaitName[] =
"Aix_Syswait";
/*
......@@ -351,7 +525,7 @@ struct rusage;\n",
*
* Description of Aix_Volatile fix
*/
#define AIX_VOLATILE_FIXIDX 8
#define AIX_VOLATILE_FIXIDX 9
tSCC zAix_VolatileName[] =
"Aix_Volatile";
/*
......@@ -386,7 +560,7 @@ const char* apzAix_VolatilePatch[] = { "sed",
*
* Description of Alpha_Getopt fix
*/
#define ALPHA_GETOPT_FIXIDX 9
#define ALPHA_GETOPT_FIXIDX 10
tSCC zAlpha_GetoptName[] =
"Alpha_Getopt";
/*
......@@ -421,7 +595,7 @@ const char* apzAlpha_GetoptPatch[] = { "sed",
*
* Description of Alpha_Parens fix
*/
#define ALPHA_PARENS_FIXIDX 10
#define ALPHA_PARENS_FIXIDX 11
tSCC zAlpha_ParensName[] =
"Alpha_Parens";
/*
......@@ -456,7 +630,7 @@ const char* apzAlpha_ParensPatch[] = { "sed",
*
* Description of Alpha_Sbrk fix
*/
#define ALPHA_SBRK_FIXIDX 11
#define ALPHA_SBRK_FIXIDX 12
tSCC zAlpha_SbrkName[] =
"Alpha_Sbrk";
/*
......@@ -491,7 +665,7 @@ const char* apzAlpha_SbrkPatch[] = { "sed",
*
* Description of Arm_Norcroft_Hint fix
*/
#define ARM_NORCROFT_HINT_FIXIDX 12
#define ARM_NORCROFT_HINT_FIXIDX 13
tSCC zArm_Norcroft_HintName[] =
"Arm_Norcroft_Hint";
/*
......@@ -526,7 +700,7 @@ const char* apzArm_Norcroft_HintPatch[] = { "sed",
*
* Description of Arm_Wchar fix
*/
#define ARM_WCHAR_FIXIDX 13
#define ARM_WCHAR_FIXIDX 14
tSCC zArm_WcharName[] =
"Arm_Wchar";
/*
......@@ -562,7 +736,7 @@ const char* apzArm_WcharPatch[] = { "sed",
*
* Description of Aux_Asm fix
*/
#define AUX_ASM_FIXIDX 14
#define AUX_ASM_FIXIDX 15
tSCC zAux_AsmName[] =
"Aux_Asm";
/*
......@@ -597,7 +771,7 @@ const char* apzAux_AsmPatch[] = { "sed",
*
* Description of Avoid_Bool fix
*/
#define AVOID_BOOL_FIXIDX 15
#define AVOID_BOOL_FIXIDX 16
tSCC zAvoid_BoolName[] =
"Avoid_Bool";
/*
......@@ -643,7 +817,7 @@ const char* apzAvoid_BoolPatch[] = { "sed",
*
* Description of Bad_Struct_Term fix
*/
#define BAD_STRUCT_TERM_FIXIDX 16
#define BAD_STRUCT_TERM_FIXIDX 17
tSCC zBad_Struct_TermName[] =
"Bad_Struct_Term";
/*
......@@ -678,7 +852,7 @@ const char* apzBad_Struct_TermPatch[] = { "sed",
*
* Description of Badquote fix
*/
#define BADQUOTE_FIXIDX 17
#define BADQUOTE_FIXIDX 18
tSCC zBadquoteName[] =
"Badquote";
/*
......@@ -705,7 +879,7 @@ const char* apzBadquotePatch[] = { "sed",
*
* Description of Bad_Lval fix
*/
#define BAD_LVAL_FIXIDX 18
#define BAD_LVAL_FIXIDX 19
tSCC zBad_LvalName[] =
"Bad_Lval";
/*
......@@ -732,7 +906,7 @@ const char* apzBad_LvalPatch[] = { "sed",
*
* Description of Broken_Assert_Stdio fix
*/
#define BROKEN_ASSERT_STDIO_FIXIDX 19
#define BROKEN_ASSERT_STDIO_FIXIDX 20
tSCC zBroken_Assert_StdioName[] =
"Broken_Assert_Stdio";
/*
......@@ -775,7 +949,7 @@ const char* apzBroken_Assert_StdioPatch[] = { "sed",
*
* Description of Broken_Assert_Stdlib fix
*/
#define BROKEN_ASSERT_STDLIB_FIXIDX 20
#define BROKEN_ASSERT_STDLIB_FIXIDX 21
tSCC zBroken_Assert_StdlibName[] =
"Broken_Assert_Stdlib";
/*
......@@ -820,7 +994,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed",
*
* Description of Bsd43_Io_Macros fix
*/
#define BSD43_IO_MACROS_FIXIDX 21
#define BSD43_IO_MACROS_FIXIDX 22
tSCC zBsd43_Io_MacrosName[] =
"Bsd43_Io_Macros";
/*
......@@ -855,7 +1029,7 @@ const char* apzBsd43_Io_MacrosPatch[] = { "sed",
*
* Description of Dec_Intern_Asm fix
*/
#define DEC_INTERN_ASM_FIXIDX 22
#define DEC_INTERN_ASM_FIXIDX 23
tSCC zDec_Intern_AsmName[] =
"Dec_Intern_Asm";
/*
......@@ -885,7 +1059,7 @@ const char* apzDec_Intern_AsmPatch[] = { "sed",
*
* Description of No_Double_Slash fix
*/
#define NO_DOUBLE_SLASH_FIXIDX 23
#define NO_DOUBLE_SLASH_FIXIDX 24
tSCC zNo_Double_SlashName[] =
"No_Double_Slash";
/*
......@@ -917,7 +1091,7 @@ const char* apzNo_Double_SlashPatch[] = {"no_double_slash",
*
* Description of Ecd_Cursor fix
*/
#define ECD_CURSOR_FIXIDX 24
#define ECD_CURSOR_FIXIDX 25
tSCC zEcd_CursorName[] =
"Ecd_Cursor";
/*
......@@ -944,7 +1118,7 @@ const char* apzEcd_CursorPatch[] = { "sed",
*
* Description of Sco5_Stat_Wrappers fix
*/
#define SCO5_STAT_WRAPPERS_FIXIDX 25
#define SCO5_STAT_WRAPPERS_FIXIDX 26
tSCC zSco5_Stat_WrappersName[] =
"Sco5_Stat_Wrappers";
/*
......@@ -981,7 +1155,7 @@ extern \"C\"\\\n\
*
* Description of End_Else_Label fix
*/
#define END_ELSE_LABEL_FIXIDX 26
#define END_ELSE_LABEL_FIXIDX 27
tSCC zEnd_Else_LabelName[] =
"End_Else_Label";
/*
......@@ -1013,7 +1187,7 @@ const char* apzEnd_Else_LabelPatch[] = {"else_endif_label",
*
* Description of Hp_Inline fix
*/
#define HP_INLINE_FIXIDX 27
#define HP_INLINE_FIXIDX 28
tSCC zHp_InlineName[] =
"Hp_Inline";
/*
......@@ -1049,7 +1223,7 @@ const char* apzHp_InlinePatch[] = { "sed",
*
* Description of Hp_Sysfile fix
*/
#define HP_SYSFILE_FIXIDX 28
#define HP_SYSFILE_FIXIDX 29
tSCC zHp_SysfileName[] =
"Hp_Sysfile";
/*
......@@ -1084,7 +1258,7 @@ const char* apzHp_SysfilePatch[] = { "sed",
*
* Description of Cxx_Unready fix
*/
#define CXX_UNREADY_FIXIDX 29
#define CXX_UNREADY_FIXIDX 30
tSCC zCxx_UnreadyName[] =
"Cxx_Unready";
/*
......@@ -1127,7 +1301,7 @@ extern \"C\" {\\\n\
*
* Description of Hpux_Maxint fix
*/
#define HPUX_MAXINT_FIXIDX 30
#define HPUX_MAXINT_FIXIDX 31
tSCC zHpux_MaxintName[] =
"Hpux_Maxint";
/*
......@@ -1157,7 +1331,7 @@ const char* apzHpux_MaxintPatch[] = { "sed",
*
* Description of Hpux_Systime fix
*/
#define HPUX_SYSTIME_FIXIDX 31
#define HPUX_SYSTIME_FIXIDX 32
tSCC zHpux_SystimeName[] =
"Hpux_Systime";
/*
......@@ -1192,7 +1366,7 @@ const char* apzHpux_SystimePatch[] = { "sed",
*
* Description of Hpux11_Uint32_C fix
*/
#define HPUX11_UINT32_C_FIXIDX 32
#define HPUX11_UINT32_C_FIXIDX 33
tSCC zHpux11_Uint32_CName[] =
"Hpux11_Uint32_C";
/*
......@@ -1227,7 +1401,7 @@ const char* apzHpux11_Uint32_CPatch[] = { "sed",
*
* Description of Interactv_Add1 fix
*/
#define INTERACTV_ADD1_FIXIDX 33
#define INTERACTV_ADD1_FIXIDX 34
tSCC zInteractv_Add1Name[] =
"Interactv_Add1";
/*
......@@ -1265,7 +1439,7 @@ const char* apzInteractv_Add1Patch[] = { "sed",
*
* Description of Interactv_Add2 fix
*/
#define INTERACTV_ADD2_FIXIDX 34
#define INTERACTV_ADD2_FIXIDX 35
tSCC zInteractv_Add2Name[] =
"Interactv_Add2";
/*
......@@ -1303,7 +1477,7 @@ const char* apzInteractv_Add2Patch[] = { "sed",
*
* Description of Interactv_Add3 fix
*/
#define INTERACTV_ADD3_FIXIDX 35
#define INTERACTV_ADD3_FIXIDX 36
tSCC zInteractv_Add3Name[] =
"Interactv_Add3";
/*
......@@ -1342,7 +1516,7 @@ const char* apzInteractv_Add3Patch[] = { "sed",
*
* Description of Io_Def_Quotes fix
*/
#define IO_DEF_QUOTES_FIXIDX 36
#define IO_DEF_QUOTES_FIXIDX 37
tSCC zIo_Def_QuotesName[] =
"Io_Def_Quotes";
/*
......@@ -1379,7 +1553,7 @@ const char* apzIo_Def_QuotesPatch[] = { "sed",
*
* Description of Ioctl_Fix_Ctrl fix
*/
#define IOCTL_FIX_CTRL_FIXIDX 37
#define IOCTL_FIX_CTRL_FIXIDX 38
tSCC zIoctl_Fix_CtrlName[] =
"Ioctl_Fix_Ctrl";
/*
......@@ -1418,7 +1592,7 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed",
*
* Description of Ip_Missing_Semi fix
*/
#define IP_MISSING_SEMI_FIXIDX 38
#define IP_MISSING_SEMI_FIXIDX 39
tSCC zIp_Missing_SemiName[] =
"Ip_Missing_Semi";
/*
......@@ -1445,7 +1619,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed",
*
* Description of Irix_Multiline_Cmnt fix
*/
#define IRIX_MULTILINE_CMNT_FIXIDX 39
#define IRIX_MULTILINE_CMNT_FIXIDX 40
tSCC zIrix_Multiline_CmntName[] =
"Irix_Multiline_Cmnt";
/*
......@@ -1473,7 +1647,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed",
*
* Description of Irix_Sockaddr fix
*/
#define IRIX_SOCKADDR_FIXIDX 40
#define IRIX_SOCKADDR_FIXIDX 41
tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr";
/*
......@@ -1509,7 +1683,7 @@ struct sockaddr;\n",
*
* Description of Irix_Struct__File fix
*/
#define IRIX_STRUCT__FILE_FIXIDX 41
#define IRIX_STRUCT__FILE_FIXIDX 42
tSCC zIrix_Struct__FileName[] =
"Irix_Struct__File";
/*
......@@ -1537,7 +1711,7 @@ struct __file_s;\n",
*
* Description of Irix_Asm_Apostrophe fix
*/
#define IRIX_ASM_APOSTROPHE_FIXIDX 42
#define IRIX_ASM_APOSTROPHE_FIXIDX 43
tSCC zIrix_Asm_ApostropheName[] =
"Irix_Asm_Apostrophe";
/*
......@@ -1572,7 +1746,7 @@ const char* apzIrix_Asm_ApostrophePatch[] = { "sed",
*
* Description of Isc_Fmod fix
*/
#define ISC_FMOD_FIXIDX 43
#define ISC_FMOD_FIXIDX 44
tSCC zIsc_FmodName[] =
"Isc_Fmod";
/*
......@@ -1607,7 +1781,7 @@ const char* apzIsc_FmodPatch[] = { "sed",
*
* Description of Motorola_Nested fix
*/
#define MOTOROLA_NESTED_FIXIDX 44
#define MOTOROLA_NESTED_FIXIDX 45
tSCC zMotorola_NestedName[] =
"Motorola_Nested";
/*
......@@ -1637,7 +1811,7 @@ const char* apzMotorola_NestedPatch[] = { "sed",
*
* Description of Isc_Sys_Limits fix
*/
#define ISC_SYS_LIMITS_FIXIDX 45
#define ISC_SYS_LIMITS_FIXIDX 46
tSCC zIsc_Sys_LimitsName[] =
"Isc_Sys_Limits";
/*
......@@ -1673,7 +1847,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed",
*
* Description of Kandr_Concat fix
*/
#define KANDR_CONCAT_FIXIDX 46
#define KANDR_CONCAT_FIXIDX 47
tSCC zKandr_ConcatName[] =
"Kandr_Concat";
/*
......@@ -1708,7 +1882,7 @@ const char* apzKandr_ConcatPatch[] = { "sed",
*
* Description of Limits_Ifndefs fix
*/
#define LIMITS_IFNDEFS_FIXIDX 47
#define LIMITS_IFNDEFS_FIXIDX 48
tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs";
/*
......@@ -1767,7 +1941,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed",
*
* Description of Lynx_Void_Int fix
*/
#define LYNX_VOID_INT_FIXIDX 48
#define LYNX_VOID_INT_FIXIDX 49
tSCC zLynx_Void_IntName[] =
"Lynx_Void_Int";
/*
......@@ -1802,7 +1976,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed",
*
* Description of Lynxos_Fcntl_Proto fix
*/
#define LYNXOS_FCNTL_PROTO_FIXIDX 49
#define LYNXOS_FCNTL_PROTO_FIXIDX 50
tSCC zLynxos_Fcntl_ProtoName[] =
"Lynxos_Fcntl_Proto";
/*
......@@ -1837,7 +2011,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed",
*
* Description of M88k_Bad_Hypot_Opt fix
*/
#define M88K_BAD_HYPOT_OPT_FIXIDX 50
#define M88K_BAD_HYPOT_OPT_FIXIDX 51
tSCC zM88k_Bad_Hypot_OptName[] =
"M88k_Bad_Hypot_Opt";
/*
......@@ -1879,7 +2053,7 @@ static __inline__ double fake_hypot (x, y)\\\n\
*
* Description of M88k_Bad_S_If fix
*/
#define M88K_BAD_S_IF_FIXIDX 51
#define M88K_BAD_S_IF_FIXIDX 52
tSCC zM88k_Bad_S_IfName[] =
"M88k_Bad_S_If";
/*
......@@ -1917,7 +2091,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed",
*
* Description of M88k_Multi_Incl fix
*/
#define M88K_MULTI_INCL_FIXIDX 52
#define M88K_MULTI_INCL_FIXIDX 53
tSCC zM88k_Multi_InclName[] =
"M88k_Multi_Incl";
/*
......@@ -1959,7 +2133,7 @@ const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
*
* Description of Machine_Name fix
*/
#define MACHINE_NAME_FIXIDX 53
#define MACHINE_NAME_FIXIDX 54
tSCC zMachine_NameName[] =
"Machine_Name";
/*
......@@ -2029,7 +2203,7 @@ s/\\\\+++fixinc_eol+++/\\\\/g\n\
*
* Description of Math_Exception fix
*/
#define MATH_EXCEPTION_FIXIDX 54
#define MATH_EXCEPTION_FIXIDX 55
tSCC zMath_ExceptionName[] =
"Math_Exception";
/*
......@@ -2079,7 +2253,7 @@ const char* apzMath_ExceptionPatch[] = { "sed",
*
* Description of Math_Gcc_Ifndefs fix
*/
#define MATH_GCC_IFNDEFS_FIXIDX 55
#define MATH_GCC_IFNDEFS_FIXIDX 56
tSCC zMath_Gcc_IfndefsName[] =
"Math_Gcc_Ifndefs";
/*
......@@ -2118,7 +2292,7 @@ const char* apzMath_Gcc_IfndefsPatch[] = { "sh", "-c",
*
* Description of Nested_Comment fix
*/
#define NESTED_COMMENT_FIXIDX 56
#define NESTED_COMMENT_FIXIDX 57
tSCC zNested_CommentName[] =
"Nested_Comment";
/*
......@@ -2145,7 +2319,7 @@ const char* apzNested_CommentPatch[] = { "sed",
*
* Description of News_Os_Recursion fix
*/
#define NEWS_OS_RECURSION_FIXIDX 57
#define NEWS_OS_RECURSION_FIXIDX 58
tSCC zNews_Os_RecursionName[] =
"News_Os_Recursion";
/*
......@@ -2183,7 +2357,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed",
*
* Description of Next_Math_Prefix fix
*/
#define NEXT_MATH_PREFIX_FIXIDX 58
#define NEXT_MATH_PREFIX_FIXIDX 59
tSCC zNext_Math_PrefixName[] =
"Next_Math_Prefix";
/*
......@@ -2222,7 +2396,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed",
*
* Description of Next_Template fix
*/
#define NEXT_TEMPLATE_FIXIDX 59
#define NEXT_TEMPLATE_FIXIDX 60
tSCC zNext_TemplateName[] =
"Next_Template";
/*
......@@ -2258,7 +2432,7 @@ const char* apzNext_TemplatePatch[] = { "sed",
*
* Description of Next_Volitile fix
*/
#define NEXT_VOLITILE_FIXIDX 60
#define NEXT_VOLITILE_FIXIDX 61
tSCC zNext_VolitileName[] =
"Next_Volitile";
/*
......@@ -2294,7 +2468,7 @@ const char* apzNext_VolitilePatch[] = { "sed",
*
* Description of Next_Wait_Union fix
*/
#define NEXT_WAIT_UNION_FIXIDX 61
#define NEXT_WAIT_UNION_FIXIDX 62
tSCC zNext_Wait_UnionName[] =
"Next_Wait_Union";
/*
......@@ -2329,7 +2503,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed",
*
* Description of Nodeent_Syntax fix
*/
#define NODEENT_SYNTAX_FIXIDX 62
#define NODEENT_SYNTAX_FIXIDX 63
tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax";
/*
......@@ -2356,7 +2530,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed",
*
* Description of Osf_Namespace_A fix
*/
#define OSF_NAMESPACE_A_FIXIDX 63
#define OSF_NAMESPACE_A_FIXIDX 64
tSCC zOsf_Namespace_AName[] =
"Osf_Namespace_A";
/*
......@@ -2402,7 +2576,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed",
*
* Description of Osf_Namespace_B fix
*/
#define OSF_NAMESPACE_B_FIXIDX 64
#define OSF_NAMESPACE_B_FIXIDX 65
tSCC zOsf_Namespace_BName[] =
"Osf_Namespace_B";
/*
......@@ -2449,7 +2623,7 @@ typedef __regmatch_t\tregmatch_t;\n",
*
* Description of Pthread_Page_Size fix
*/
#define PTHREAD_PAGE_SIZE_FIXIDX 65
#define PTHREAD_PAGE_SIZE_FIXIDX 66
tSCC zPthread_Page_SizeName[] =
"Pthread_Page_Size";
/*
......@@ -2484,7 +2658,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed",
*
* Description of Read_Ret_Type fix
*/
#define READ_RET_TYPE_FIXIDX 66
#define READ_RET_TYPE_FIXIDX 67
tSCC zRead_Ret_TypeName[] =
"Read_Ret_Type";
/*
......@@ -2520,7 +2694,7 @@ const char* apzRead_Ret_TypePatch[] = { "sed",
*
* Description of Rs6000_Double fix
*/
#define RS6000_DOUBLE_FIXIDX 67
#define RS6000_DOUBLE_FIXIDX 68
tSCC zRs6000_DoubleName[] =
"Rs6000_Double";
/*
......@@ -2558,7 +2732,7 @@ const char* apzRs6000_DoublePatch[] = { "sed",
*
* Description of Rs6000_Fchmod fix
*/
#define RS6000_FCHMOD_FIXIDX 68
#define RS6000_FCHMOD_FIXIDX 69
tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod";
/*
......@@ -2593,7 +2767,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed",
*
* Description of Rs6000_Param fix
*/
#define RS6000_PARAM_FIXIDX 69
#define RS6000_PARAM_FIXIDX 70
tSCC zRs6000_ParamName[] =
"Rs6000_Param";
/*
......@@ -2620,7 +2794,7 @@ const char* apzRs6000_ParamPatch[] = { "sed",
*
* Description of Sony_Include fix
*/
#define SONY_INCLUDE_FIXIDX 70
#define SONY_INCLUDE_FIXIDX 71
tSCC zSony_IncludeName[] =
"Sony_Include";
/*
......@@ -2655,7 +2829,7 @@ const char* apzSony_IncludePatch[] = { "sed",
*
* Description of Statsswtch fix
*/
#define STATSSWTCH_FIXIDX 71
#define STATSSWTCH_FIXIDX 72
tSCC zStatsswtchName[] =
"Statsswtch";
/*
......@@ -2690,7 +2864,7 @@ const char* apzStatsswtchPatch[] = { "sed",
*
* Description of Stdio_Va_List fix
*/
#define STDIO_VA_LIST_FIXIDX 72
#define STDIO_VA_LIST_FIXIDX 73
tSCC zStdio_Va_ListName[] =
"Stdio_Va_List";
/*
......@@ -2734,7 +2908,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c",
*
* Description of Sun_Bogus_Ifdef fix
*/
#define SUN_BOGUS_IFDEF_FIXIDX 73
#define SUN_BOGUS_IFDEF_FIXIDX 74
tSCC zSun_Bogus_IfdefName[] =
"Sun_Bogus_Ifdef";
/*
......@@ -2769,7 +2943,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed",
*
* Description of Sun_Bogus_Ifdef_Sun4c fix
*/
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 74
#define SUN_BOGUS_IFDEF_SUN4C_FIXIDX 75
tSCC zSun_Bogus_Ifdef_Sun4cName[] =
"Sun_Bogus_Ifdef_Sun4c";
/*
......@@ -2804,7 +2978,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed",
*
* Description of Sun_Catmacro fix
*/
#define SUN_CATMACRO_FIXIDX 75
#define SUN_CATMACRO_FIXIDX 76
tSCC zSun_CatmacroName[] =
"Sun_Catmacro";
/*
......@@ -2844,7 +3018,7 @@ const char* apzSun_CatmacroPatch[] = { "sed",
*
* Description of Sun_Malloc fix
*/
#define SUN_MALLOC_FIXIDX 76
#define SUN_MALLOC_FIXIDX 77
tSCC zSun_MallocName[] =
"Sun_Malloc";
/*
......@@ -2874,7 +3048,7 @@ const char* apzSun_MallocPatch[] = { "sed",
*
* Description of Sun_Memcpy fix
*/
#define SUN_MEMCPY_FIXIDX 77
#define SUN_MEMCPY_FIXIDX 78
tSCC zSun_MemcpyName[] =
"Sun_Memcpy";
/*
......@@ -2929,7 +3103,7 @@ extern int memcmp();\\\n\
*
* Description of Sun_Rusers_Semi fix
*/
#define SUN_RUSERS_SEMI_FIXIDX 78
#define SUN_RUSERS_SEMI_FIXIDX 79
tSCC zSun_Rusers_SemiName[] =
"Sun_Rusers_Semi";
/*
......@@ -2964,7 +3138,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed",
*
* Description of Sun_Signal fix
*/
#define SUN_SIGNAL_FIXIDX 79
#define SUN_SIGNAL_FIXIDX 80
tSCC zSun_SignalName[] =
"Sun_Signal";
/*
......@@ -3004,7 +3178,7 @@ void\t(*signal(...))(...);\\\n\
*
* Description of Sun_Auth_Proto fix
*/
#define SUN_AUTH_PROTO_FIXIDX 80
#define SUN_AUTH_PROTO_FIXIDX 81
tSCC zSun_Auth_ProtoName[] =
"Sun_Auth_Proto";
/*
......@@ -3044,7 +3218,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed",
*
* Description of Sunos_Matherr_Decl fix
*/
#define SUNOS_MATHERR_DECL_FIXIDX 81
#define SUNOS_MATHERR_DECL_FIXIDX 82
tSCC zSunos_Matherr_DeclName[] =
"Sunos_Matherr_Decl";
/*
......@@ -3073,7 +3247,7 @@ struct exception;\n",
*
* Description of Sunos_Strlen fix
*/
#define SUNOS_STRLEN_FIXIDX 82
#define SUNOS_STRLEN_FIXIDX 83
tSCC zSunos_StrlenName[] =
"Sunos_Strlen";
/*
......@@ -3100,7 +3274,7 @@ const char* apzSunos_StrlenPatch[] = { "sed",
*
* Description of Systypes fix
*/
#define SYSTYPES_FIXIDX 83
#define SYSTYPES_FIXIDX 84
tSCC zSystypesName[] =
"Systypes";
/*
......@@ -3159,7 +3333,7 @@ typedef __SIZE_TYPE__ size_t;\\\n\
*
* Description of Systypes_For_Aix fix
*/
#define SYSTYPES_FOR_AIX_FIXIDX 84
#define SYSTYPES_FOR_AIX_FIXIDX 85
tSCC zSystypes_For_AixName[] =
"Systypes_For_Aix";
/*
......@@ -3205,7 +3379,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed",
*
* Description of Sysv68_String fix
*/
#define SYSV68_STRING_FIXIDX 85
#define SYSV68_STRING_FIXIDX 86
tSCC zSysv68_StringName[] =
"Sysv68_String";
/*
......@@ -3242,7 +3416,7 @@ extern unsigned int\\\n\
*
* Description of Sysz_Stdlib_For_Sun fix
*/
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 86
#define SYSZ_STDLIB_FOR_SUN_FIXIDX 87
tSCC zSysz_Stdlib_For_SunName[] =
"Sysz_Stdlib_For_Sun";
/*
......@@ -3280,7 +3454,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
*
* Description of Sysz_Stdtypes_For_Sun fix
*/
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 87
#define SYSZ_STDTYPES_FOR_SUN_FIXIDX 88
tSCC zSysz_Stdtypes_For_SunName[] =
"Sysz_Stdtypes_For_Sun";
/*
......@@ -3321,7 +3495,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
*
* Description of Tinfo_Cplusplus fix
*/
#define TINFO_CPLUSPLUS_FIXIDX 88
#define TINFO_CPLUSPLUS_FIXIDX 89
tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus";
/*
......@@ -3348,7 +3522,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed",
*
* Description of Ultrix_Ansi_Compat fix
*/
#define ULTRIX_ANSI_COMPAT_FIXIDX 89
#define ULTRIX_ANSI_COMPAT_FIXIDX 90
tSCC zUltrix_Ansi_CompatName[] =
"Ultrix_Ansi_Compat";
/*
......@@ -3385,7 +3559,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed",
*
* Description of Ultrix_Fix_Fixproto fix
*/
#define ULTRIX_FIX_FIXPROTO_FIXIDX 90
#define ULTRIX_FIX_FIXPROTO_FIXIDX 91
tSCC zUltrix_Fix_FixprotoName[] =
"Ultrix_Fix_Fixproto";
/*
......@@ -3421,7 +3595,7 @@ struct utsname;\n",
*
* Description of Ultrix_Atof_Param fix
*/
#define ULTRIX_ATOF_PARAM_FIXIDX 91
#define ULTRIX_ATOF_PARAM_FIXIDX 92
tSCC zUltrix_Atof_ParamName[] =
"Ultrix_Atof_Param";
/*
......@@ -3452,7 +3626,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed",
*
* Description of Ultrix_Const fix
*/
#define ULTRIX_CONST_FIXIDX 92
#define ULTRIX_CONST_FIXIDX 93
tSCC zUltrix_ConstName[] =
"Ultrix_Const";
/*
......@@ -3487,7 +3661,7 @@ const char* apzUltrix_ConstPatch[] = { "sed",
*
* Description of Ultrix_Ifdef fix
*/
#define ULTRIX_IFDEF_FIXIDX 93
#define ULTRIX_IFDEF_FIXIDX 94
tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef";
/*
......@@ -3522,7 +3696,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed",
*
* Description of Ultrix_Nested_Cmnt fix
*/
#define ULTRIX_NESTED_CMNT_FIXIDX 94
#define ULTRIX_NESTED_CMNT_FIXIDX 95
tSCC zUltrix_Nested_CmntName[] =
"Ultrix_Nested_Cmnt";
/*
......@@ -3549,7 +3723,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed",
*
* Description of Ultrix_Static fix
*/
#define ULTRIX_STATIC_FIXIDX 95
#define ULTRIX_STATIC_FIXIDX 96
tSCC zUltrix_StaticName[] =
"Ultrix_Static";
/*
......@@ -3586,7 +3760,7 @@ const char* apzUltrix_StaticPatch[] = { "sed",
*
* Description of Undefine_Null fix
*/
#define UNDEFINE_NULL_FIXIDX 96
#define UNDEFINE_NULL_FIXIDX 97
tSCC zUndefine_NullName[] =
"Undefine_Null";
/*
......@@ -3626,9 +3800,52 @@ const char* apzUndefine_NullPatch[] = { "sed",
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Unixware7_Byteorder_Fix fix
*/
#define UNIXWARE7_BYTEORDER_FIX_FIXIDX 98
tSCC zUnixware7_Byteorder_FixName[] =
"Unixware7_Byteorder_Fix";
/*
* File name selection pattern
*/
tSCC zUnixware7_Byteorder_FixList[] =
"|arpa/inet.h|";
/*
* Machine/OS name selection pattern
*/
tSCC* apzUnixware7_Byteorder_FixMachs[] = {
"*-*-sysv4*",
"i[34567]86-*-sysv5*",
"i[34567]86-*-udk*",
"i[34567]86-*-solaris2.[0-4]",
"powerpcle-*-solaris2.[0-4]",
"sparc-*-solaris2.[0-4]",
(const char*)NULL };
/*
* content selection pattern - do fix if pattern found
*/
tSCC zUnixware7_Byteorder_FixSelect0[] =
"in_port_t";
#define UNIXWARE7_BYTEORDER_FIX_TEST_CT 1
#define UNIXWARE7_BYTEORDER_FIX_RE_CT 1
tTestDesc aUnixware7_Byteorder_FixTests[] = {
{ TT_EGREP, zUnixware7_Byteorder_FixSelect0, (regex_t*)NULL }, };
/*
* Fix Command Arguments for Unixware7_Byteorder_Fix
*/
const char* apzUnixware7_Byteorder_FixPatch[] = { "sed",
"-e", "/^extern.*htons.*(in_port_t)/d",
"-e", "/^extern.*ntohs.*(in_port_t)/d",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
* Description of Va_I960_Macro fix
*/
#define VA_I960_MACRO_FIXIDX 97
#define VA_I960_MACRO_FIXIDX 99
tSCC zVa_I960_MacroName[] =
"Va_I960_Macro";
/*
......@@ -3666,7 +3883,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed",
*
* Description of Void_Null fix
*/
#define VOID_NULL_FIXIDX 98
#define VOID_NULL_FIXIDX 100
tSCC zVoid_NullName[] =
"Void_Null";
/*
......@@ -3701,7 +3918,7 @@ const char* apzVoid_NullPatch[] = { "sed",
*
* Description of Vxworks_Gcc_Problem fix
*/
#define VXWORKS_GCC_PROBLEM_FIXIDX 99
#define VXWORKS_GCC_PROBLEM_FIXIDX 101
tSCC zVxworks_Gcc_ProblemName[] =
"Vxworks_Gcc_Problem";
/*
......@@ -3751,7 +3968,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
*
* Description of Vxworks_Needs_Vxtypes fix
*/
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 100
#define VXWORKS_NEEDS_VXTYPES_FIXIDX 102
tSCC zVxworks_Needs_VxtypesName[] =
"Vxworks_Needs_Vxtypes";
/*
......@@ -3786,7 +4003,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed",
*
* Description of Vxworks_Needs_Vxworks fix
*/
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 101
#define VXWORKS_NEEDS_VXWORKS_FIXIDX 103
tSCC zVxworks_Needs_VxworksName[] =
"Vxworks_Needs_Vxworks";
/*
......@@ -3835,7 +4052,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
*
* Description of Vxworks_Time fix
*/
#define VXWORKS_TIME_FIXIDX 102
#define VXWORKS_TIME_FIXIDX 104
tSCC zVxworks_TimeName[] =
"Vxworks_Time";
/*
......@@ -3886,7 +4103,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\\\n\
*
* Description of X11_Class fix
*/
#define X11_CLASS_FIXIDX 103
#define X11_CLASS_FIXIDX 105
tSCC zX11_ClassName[] =
"X11_Class";
/*
......@@ -3926,7 +4143,7 @@ const char* apzX11_ClassPatch[] = { "sed",
*
* Description of X11_Class_Usage fix
*/
#define X11_CLASS_USAGE_FIXIDX 104
#define X11_CLASS_USAGE_FIXIDX 106
tSCC zX11_Class_UsageName[] =
"X11_Class_Usage";
/*
......@@ -3961,7 +4178,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed",
*
* Description of X11_New fix
*/
#define X11_NEW_FIXIDX 105
#define X11_NEW_FIXIDX 107
tSCC zX11_NewName[] =
"X11_New";
/*
......@@ -4002,7 +4219,7 @@ const char* apzX11_NewPatch[] = { "sed",
*
* Description of X11_Sprintf fix
*/
#define X11_SPRINTF_FIXIDX 106
#define X11_SPRINTF_FIXIDX 108
tSCC zX11_SprintfName[] =
"X11_Sprintf";
/*
......@@ -4031,9 +4248,9 @@ extern char *\tsprintf();\\\n\
*
* List of all fixes
*/
#define REGEX_COUNT 74
#define MACH_LIST_SIZE_LIMIT 154
#define FIX_COUNT 107
#define REGEX_COUNT 75
#define MACH_LIST_SIZE_LIMIT 279
#define FIX_COUNT 109
tFixDesc fixDescList[ FIX_COUNT ] = {
{ zAaa_Ki_IfaceName, zAaa_Ki_IfaceList,
......@@ -4071,6 +4288,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
AAB_DGUX_INT_VARARGS_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Dgux_Int_VarargsTests, apzAab_Dgux_Int_VarargsPatch },
{ zAab_Svr4_Replace_ByteorderName, zAab_Svr4_Replace_ByteorderList,
apzAab_Svr4_Replace_ByteorderMachs, (regex_t*)NULL,
AAB_SVR4_REPLACE_BYTEORDER_TEST_CT, FD_MACH_ONLY | FD_REPLACEMENT,
aAab_Svr4_Replace_ByteorderTests, apzAab_Svr4_Replace_ByteorderPatch },
{ zAix_SyswaitName, zAix_SyswaitList,
apzAix_SyswaitMachs, (regex_t*)NULL,
AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY,
......@@ -4521,6 +4743,11 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
UNDEFINE_NULL_TEST_CT, FD_MACH_ONLY,
aUndefine_NullTests, apzUndefine_NullPatch },
{ zUnixware7_Byteorder_FixName, zUnixware7_Byteorder_FixList,
apzUnixware7_Byteorder_FixMachs, (regex_t*)NULL,
UNIXWARE7_BYTEORDER_FIX_TEST_CT, FD_MACH_ONLY,
aUnixware7_Byteorder_FixTests, apzUnixware7_Byteorder_FixPatch },
{ zVa_I960_MacroName, zVa_I960_MacroList,
apzVa_I960_MacroMachs, (regex_t*)NULL,
VA_I960_MACRO_TEST_CT, FD_MACH_ONLY,
......
......@@ -11,6 +11,7 @@ Please see the README before adding or changing entries in this file.
Now, first: DO NOT DO BROKEN FIXES (empty replacement fixes) */
/*
* Purge some HP-UX 11 files that are only borken after they are "fixed".
*/
......@@ -154,6 +155,169 @@ typedef char * va_list;
/*
* Completely replace <sys/byteorder.h>; with a file that implements gcc's
* optimized byteswapping. Restricted to "SVR4" machines until either
* it is shown to be safe to replace this file always, or we get bolder ;-)
*/
fix = {
hackname = AAB_svr4_replace_byteorder;
#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i[34567]86-*-sysv5*";
mach = "i[34567]86-*-udk*";
mach = "i[34567]86-*-solaris2.[0-4]";
mach = "powerpcle-*-solaris2.[0-4]";
mach = "sparc-*-solaris2.[0-4]";
#endif /* SVR5 */
files = sys/byteorder.h;
replace = '#ifndef _SYS_BYTEORDER_H
\#define _SYS_BYTEORDER_H
/* Functions to convert `short\' and `long\' quantities from host byte order
to (internet) network byte order (i.e. big-endian).
Written by Ron Guilmette (rfg@ncd.com).
This isn\'t actually used by GCC. It is installed by fixinc.svr4.
For big-endian machines these functions are essentially no-ops.
For little-endian machines, we define the functions using specialized
asm sequences in cases where doing so yields better code (e.g. i386). */
\#if !defined (__GNUC__) && !defined (__GNUG__)
\#error You lose! This file is only useful with GNU compilers.
\#endif
\#ifndef __BYTE_ORDER__
/* Byte order defines. These are as defined on UnixWare 1.1, but with
double underscores added at the front and back. */
\#define __LITTLE_ENDIAN__ 1234
\#define __BIG_ENDIAN__ 4321
\#define __PDP_ENDIAN__ 3412
\#endif
\#ifdef __STDC__
static __inline__ unsigned long htonl (unsigned long);
static __inline__ unsigned short htons (unsigned int);
static __inline__ unsigned long ntohl (unsigned long);
static __inline__ unsigned short ntohs (unsigned int);
\#endif /* defined (__STDC__) */
\#if defined (__i386__)
\#ifndef __BYTE_ORDER__
\#define __BYTE_ORDER__ __LITTLE_ENDIAN__
\#endif
/* Convert a host long to a network long. */
/* We must use a new-style function definition, so that this will also
be valid for C++. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
register unsigned long __result;
__asm__ ("xchg%B0 %b0,%h0
ror%L0 $16,%0
xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
return __result;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
register unsigned short __result;
__asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
return __result;
}
\#elif ((defined (__i860__) && !defined (__i860_big_endian__)) \
|| defined (__ns32k__) || defined (__vax__) \
|| defined (__spur__) || defined (__arm__))
\#ifndef __BYTE_ORDER__
\#define __BYTE_ORDER__ __LITTLE_ENDIAN__
\#endif
/* For other little-endian machines, using C code is just as efficient as
using assembly code. */
/* Convert a host long to a network long. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
register unsigned long __result;
__result = (__arg >> 24) & 0x000000ff;
__result |= (__arg >> 8) & 0x0000ff00;
__result |= (__arg << 8) & 0x00ff0000;
__result |= (__arg << 24) & 0xff000000;
return __result;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
register unsigned short __result;
__result = (__arg << 8) & 0xff00;
__result |= (__arg >> 8) & 0x00ff;
return __result;
}
\#else /* must be a big-endian machine */
\#ifndef __BYTE_ORDER__
\#define __BYTE_ORDER__ __BIG_ENDIAN__
\#endif
/* Convert a host long to a network long. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
return __arg;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
return __arg;
}
\#endif /* big-endian */
/* Convert a network long to a host long. */
static __inline__ unsigned long
ntohl (unsigned long __arg)
{
return htonl (__arg);
}
/* Convert a network short to a host short. */
static __inline__ unsigned short
ntohs (unsigned int __arg)
{
return htons (__arg);
}
\#endif
';
};
/*
* Completely replace <sys/varargs.h> with a file that includes gcc's
* stdarg.h or varargs.h files as appropriate.
*/
......@@ -1709,13 +1873,25 @@ fix = {
};
#endif
/*
* Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__.
* On some systems (UnixWare 2, UnixWare 7), the file is byteorder.h
* but we still "hijack" it and redirect it to the GNU byteorder.h..
*
*
*/
#ifdef SVR4
#ifdef SVR5
fix = {
hackname = svr4_endian;
files = sys/endian.h;
#ifdef LATER
/*
* since we emit our own sys/byteorder.h,
* this fix can never be applied to that file.
*/
files = sys/byteorder.h;
#endif
bypass = '__GNUC__';
sed = "/#\tifdef\t__STDC__/i\\\n"
......@@ -1726,7 +1902,8 @@ fix = {
sed = "/# include\t<sys\\/byteorder.h>/i\\\n"
"# endif /* !defined (__GNUC__) && !defined (__GNUG__) */\n";
};
#endif
#endif /* SVR5 */
/*
* Remove useless extern keyword from struct forward declarations
......@@ -1841,33 +2018,23 @@ fix = {
};
#endif
/*
* Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>.
* They are declared as non-static then immediately redeclared as static.
*/
#ifdef SVR4
#ifdef SVR5
fix = {
hackname = svr4_mkdev;
files = sys/mkdev.h;
select = '^static';
sed = "/^dev_t makedev(const/c\\\n"
"static dev_t makedev(const major_t, const minor_t);";
sed = "/^dev_t makedev()/c\\\n"
"static dev_t makedev();";
sed = "/^major_t major(const/c\\\n"
"static major_t major(const dev_t);";
sed = "/^major_t major()/c\\\n"
"static major_t major();";
sed = "/^minor_t minor(const/c\\\n"
"static minor_t minor(const dev_t);";
sed = "/^minor_t minor()/c\\\n"
"static minor_t minor();";
sed = "/^dev_t makedev(/s/^/static /";
sed = "/^major_t major(/s/^/static /";
sed = "/^minor_t minor(/s/^/static /";
};
#endif
#endif /* SVR5 */
/*
* Fix reference to NC_NPI_RAW in <sys/netcspace.h>.
......@@ -1990,6 +2157,21 @@ fix = {
};
#endif
/*
* Like svr4_mach_defines, but with newfangled syntax.
* Source lines are of #define __i386 #machine(i386). Delete them.
*/
#ifdef SVR5
fix = {
hackname = svr5_mach_defines;
files = ieeefp.h;
select = "#define[ \t]*__i386.*\(i386\)";
sed = "/#define[ \t]*__i386.*/d";
};
#endif /* SVR5 */
/*
* Fix return value of mem{ccpy,chr,cpy,set} and str{len,spn,cspn}
* in string.h on sysV68
......@@ -2267,6 +2449,29 @@ fix = {
/*
* If arpa/inet.h prototypes are incompatible with the ones we just
* installed in <sys/byteorder.h>, just remove the protos.
* Because of this close association, this patch must be applied only
* on those systems where the replacement byteorder header is installed.
*/
fix = {
hackname = unixware7_byteorder_fix;
files = arpa/inet.h;
select = "in_port_t";
#ifndef SVR5
mach = "*-*-sysv4*";
mach = "i[34567]86-*-sysv5*";
mach = "i[34567]86-*-udk*";
mach = "i[34567]86-*-solaris2.[0-4]";
mach = "powerpcle-*-solaris2.[0-4]";
mach = "sparc-*-solaris2.[0-4]";
#endif /* SVR5 */
sed = '/^extern.*htons.*(in_port_t)/d';
sed = '/^extern.*ntohs.*(in_port_t)/d';
};
/*
* Fix definitions of macros used by va-i960.h in VxWorks header file.
*/
fix = {
......
......@@ -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 107 fixup scripts.
# This script contains 109 fixup scripts.
#
# See README-fixinc for more information.
#
......@@ -521,7 +521,170 @@ _EOF_
#
# Fix 8: Aix_Syswait
# Fix 8: Aab_Svr4_Replace_Byteorder
#
case "${file}" in ./sys/byteorder.h )
case "$target_canonical" in *-*-sysv4* | \
i[34567]86-*-sysv5* | \
i[34567]86-*-udk* | \
i[34567]86-*-solaris2.[0-4] | \
powerpcle-*-solaris2.[0-4] | \
sparc-*-solaris2.[0-4] )
echo "aab_svr4_replace_byteorder replacing file ${file}" >&2
cat > ${DESTFILE} << '_EOF_'
#ifndef _SYS_BYTEORDER_H
#define _SYS_BYTEORDER_H
/* Functions to convert `short' and `long' quantities from host byte order
to (internet) network byte order (i.e. big-endian).
Written by Ron Guilmette (rfg@ncd.com).
This isn't actually used by GCC. It is installed by fixinc.svr4.
For big-endian machines these functions are essentially no-ops.
For little-endian machines, we define the functions using specialized
asm sequences in cases where doing so yields better code (e.g. i386). */
#if !defined (__GNUC__) && !defined (__GNUG__)
#error You lose! This file is only useful with GNU compilers.
#endif
#ifndef __BYTE_ORDER__
/* Byte order defines. These are as defined on UnixWare 1.1, but with
double underscores added at the front and back. */
#define __LITTLE_ENDIAN__ 1234
#define __BIG_ENDIAN__ 4321
#define __PDP_ENDIAN__ 3412
#endif
#ifdef __STDC__
static __inline__ unsigned long htonl (unsigned long);
static __inline__ unsigned short htons (unsigned int);
static __inline__ unsigned long ntohl (unsigned long);
static __inline__ unsigned short ntohs (unsigned int);
#endif /* defined (__STDC__) */
#if defined (__i386__)
#ifndef __BYTE_ORDER__
#define __BYTE_ORDER__ __LITTLE_ENDIAN__
#endif
/* Convert a host long to a network long. */
/* We must use a new-style function definition, so that this will also
be valid for C++. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
register unsigned long __result;
__asm__ ("xchg%B0 %b0,%h0
ror%L0 $16,%0
xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
return __result;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
register unsigned short __result;
__asm__ ("xchg%B0 %b0,%h0" : "=q" (__result) : "0" (__arg));
return __result;
}
#elif ((defined (__i860__) && !defined (__i860_big_endian__)) || defined (__ns32k__) || defined (__vax__) || defined (__spur__) || defined (__arm__))
#ifndef __BYTE_ORDER__
#define __BYTE_ORDER__ __LITTLE_ENDIAN__
#endif
/* For other little-endian machines, using C code is just as efficient as
using assembly code. */
/* Convert a host long to a network long. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
register unsigned long __result;
__result = (__arg >> 24) & 0x000000ff;
__result |= (__arg >> 8) & 0x0000ff00;
__result |= (__arg << 8) & 0x00ff0000;
__result |= (__arg << 24) & 0xff000000;
return __result;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
register unsigned short __result;
__result = (__arg << 8) & 0xff00;
__result |= (__arg >> 8) & 0x00ff;
return __result;
}
#else /* must be a big-endian machine */
#ifndef __BYTE_ORDER__
#define __BYTE_ORDER__ __BIG_ENDIAN__
#endif
/* Convert a host long to a network long. */
static __inline__ unsigned long
htonl (unsigned long __arg)
{
return __arg;
}
/* Convert a host short to a network short. */
static __inline__ unsigned short
htons (unsigned int __arg)
{
return __arg;
}
#endif /* big-endian */
/* Convert a network long to a host long. */
static __inline__ unsigned long
ntohl (unsigned long __arg)
{
return htonl (__arg);
}
/* Convert a network short to a host short. */
static __inline__ unsigned short
ntohs (unsigned int __arg)
{
return htons (__arg);
}
#endif
_EOF_
continue
;; # case end for machine type test
esac
;; # case end for file name test
esac
#
# Fix 9: Aix_Syswait
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'bos325,' ${file}`"
......@@ -544,7 +707,7 @@ struct rusage;
#
# Fix 9: Aix_Volatile
# Fix 10: Aix_Volatile
#
case "${file}" in ./sys/signal.h )
if ( test -n "`egrep 'typedef volatile int sig_atomic_t' ${file}`"
......@@ -565,7 +728,7 @@ struct rusage;
#
# Fix 10: Alpha_Getopt
# Fix 11: Alpha_Getopt
#
case "${file}" in ./stdio.h | \
./stdlib.h )
......@@ -587,7 +750,7 @@ struct rusage;
#
# Fix 11: Alpha_Parens
# Fix 12: Alpha_Parens
#
case "${file}" in ./sym.h )
if ( test -n "`egrep '#ifndef\\(__mips64\\)' ${file}`"
......@@ -608,7 +771,7 @@ struct rusage;
#
# Fix 12: Alpha_Sbrk
# Fix 13: Alpha_Sbrk
#
case "${file}" in ./unistd.h )
if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' ${file}`"
......@@ -629,7 +792,7 @@ struct rusage;
#
# Fix 13: Arm_Norcroft_Hint
# Fix 14: Arm_Norcroft_Hint
#
case "${file}" in ./X11/Intrinsic.h )
if ( test -n "`egrep '___type p_type' ${file}`"
......@@ -650,7 +813,7 @@ struct rusage;
#
# Fix 14: Arm_Wchar
# Fix 15: Arm_Wchar
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' ${file}`"
......@@ -672,7 +835,7 @@ struct rusage;
#
# Fix 15: Aux_Asm
# Fix 16: Aux_Asm
#
case "${file}" in ./sys/param.h )
if ( test -n "`egrep '#ifndef NOINLINE' ${file}`"
......@@ -693,7 +856,7 @@ struct rusage;
#
# Fix 16: Avoid_Bool
# Fix 17: Avoid_Bool
#
case "${file}" in ./curses.h | \
./curses_colr/curses.h | \
......@@ -743,7 +906,7 @@ struct rusage;
#
# Fix 17: Bad_Struct_Term
# Fix 18: Bad_Struct_Term
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' ${file}`"
......@@ -764,7 +927,7 @@ struct rusage;
#
# Fix 18: Badquote
# Fix 19: Badquote
#
case "${file}" in ./sundev/vuid_event.h )
fixlist="${fixlist}
......@@ -782,7 +945,7 @@ struct rusage;
#
# Fix 19: Bad_Lval
# Fix 20: Bad_Lval
#
case "${file}" in ./libgen.h | \
./dirent.h | \
......@@ -813,7 +976,7 @@ struct rusage;
#
# Fix 20: Broken_Assert_Stdio
# Fix 21: Broken_Assert_Stdio
#
case "${file}" in ./assert.h )
if ( test -n "`egrep 'stderr' ${file}`"
......@@ -840,7 +1003,7 @@ struct rusage;
#
# Fix 21: Broken_Assert_Stdlib
# Fix 22: Broken_Assert_Stdlib
#
case "${file}" in ./assert.h )
if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`"
......@@ -869,7 +1032,7 @@ struct rusage;
#
# Fix 22: Bsd43_Io_Macros
# Fix 23: Bsd43_Io_Macros
#
if ( test -n "`egrep 'BSD43__IO' ${file}`"
) > /dev/null 2>&1 ; then
......@@ -888,7 +1051,7 @@ struct rusage;
#
# Fix 23: Dec_Intern_Asm
# Fix 24: Dec_Intern_Asm
#
case "${file}" in ./c_asm.h )
fixlist="${fixlist}
......@@ -911,7 +1074,7 @@ struct rusage;
#
# Fix 24: No_Double_Slash
# Fix 25: No_Double_Slash
#
if ${FIXTESTS} ${file} double_slash
then
......@@ -927,7 +1090,7 @@ struct rusage;
#
# Fix 25: Ecd_Cursor
# Fix 26: Ecd_Cursor
#
case "${file}" in ./sunwindow/win_lock.h | \
./sunwindow/win_cursor.h )
......@@ -946,7 +1109,7 @@ struct rusage;
#
# Fix 26: Sco5_Stat_Wrappers
# Fix 27: Sco5_Stat_Wrappers
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in i*86-*-sco3.2v5* )
......@@ -977,7 +1140,7 @@ extern "C"\
#
# Fix 27: End_Else_Label
# Fix 28: End_Else_Label
#
if ${FIXTESTS} ${file} else_endif_label
then
......@@ -993,7 +1156,7 @@ extern "C"\
#
# Fix 28: Hp_Inline
# Fix 29: Hp_Inline
#
case "${file}" in ./sys/spinlock.h )
if ( test -n "`egrep 'include.*\"\\.\\./machine/' ${file}`"
......@@ -1015,7 +1178,7 @@ extern "C"\
#
# Fix 29: Hp_Sysfile
# Fix 30: Hp_Sysfile
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep 'HPUX_SOURCE' ${file}`"
......@@ -1036,7 +1199,7 @@ extern "C"\
#
# Fix 30: Cxx_Unready
# Fix 31: Cxx_Unready
#
case "${file}" in ./sys/mman.h | \
./rpc/types.h )
......@@ -1069,7 +1232,7 @@ extern "C" {\
#
# Fix 31: Hpux_Maxint
# Fix 32: Hpux_Maxint
#
case "${file}" in ./sys/param.h )
fixlist="${fixlist}
......@@ -1092,7 +1255,7 @@ extern "C" {\
#
# Fix 32: Hpux_Systime
# Fix 33: Hpux_Systime
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '^extern struct sigevent;' ${file}`"
......@@ -1113,7 +1276,7 @@ extern "C" {\
#
# Fix 33: Hpux11_Uint32_C
# Fix 34: Hpux11_Uint32_C
#
case "${file}" in ./inttypes.h )
if ( test -n "`egrep '^#define UINT32_C\\(__c\\)[ ]*__CONCAT__\\(__CONCAT_U__\\(__c\\),l\\)' ${file}`"
......@@ -1134,7 +1297,7 @@ extern "C" {\
#
# Fix 34: Interactv_Add1
# Fix 35: Interactv_Add1
#
case "${file}" in ./stdio.h | \
./math.h | \
......@@ -1161,7 +1324,7 @@ extern "C" {\
#
# Fix 35: Interactv_Add2
# Fix 36: Interactv_Add2
#
case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
......@@ -1183,7 +1346,7 @@ extern "C" {\
#
# Fix 36: Interactv_Add3
# Fix 37: Interactv_Add3
#
case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
......@@ -1206,7 +1369,7 @@ extern "C" {\
#
# Fix 37: Io_Def_Quotes
# Fix 38: Io_Def_Quotes
#
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
......@@ -1227,7 +1390,7 @@ extern "C" {\
#
# Fix 38: Ioctl_Fix_Ctrl
# Fix 39: Ioctl_Fix_Ctrl
#
if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then
......@@ -1250,7 +1413,7 @@ extern "C" {\
#
# Fix 39: Ip_Missing_Semi
# Fix 40: Ip_Missing_Semi
#
case "${file}" in ./netinet/ip.h )
fixlist="${fixlist}
......@@ -1268,7 +1431,7 @@ extern "C" {\
#
# Fix 40: Irix_Multiline_Cmnt
# Fix 41: Irix_Multiline_Cmnt
#
case "${file}" in ./sys/types.h )
fixlist="${fixlist}
......@@ -1287,7 +1450,7 @@ extern "C" {\
#
# Fix 41: Irix_Sockaddr
# Fix 42: Irix_Sockaddr
#
case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
......@@ -1310,7 +1473,7 @@ struct sockaddr;
#
# Fix 42: Irix_Struct__File
# Fix 43: Irix_Struct__File
#
case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist}
......@@ -1330,7 +1493,7 @@ struct __file_s;
#
# Fix 43: Irix_Asm_Apostrophe
# Fix 44: Irix_Asm_Apostrophe
#
case "${file}" in ./sys/asm.h )
if ( test -n "`egrep '^[ ]*#.*[Ww]e'\\''re' ${file}`"
......@@ -1351,7 +1514,7 @@ struct __file_s;
#
# Fix 44: Isc_Fmod
# Fix 45: Isc_Fmod
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
......@@ -1372,7 +1535,7 @@ struct __file_s;
#
# Fix 45: Motorola_Nested
# Fix 46: Motorola_Nested
#
case "${file}" in ./limits.h | \
./sys/limits.h )
......@@ -1395,7 +1558,7 @@ struct __file_s;
#
# Fix 46: Isc_Sys_Limits
# Fix 47: Isc_Sys_Limits
#
case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`"
......@@ -1417,7 +1580,7 @@ struct __file_s;
#
# Fix 47: Kandr_Concat
# Fix 48: Kandr_Concat
#
case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \
......@@ -1455,7 +1618,7 @@ struct __file_s;
#
# Fix 48: Limits_Ifndefs
# Fix 49: Limits_Ifndefs
#
case "${file}" in ./limits.h | \
./sys/limits.h )
......@@ -1514,7 +1677,7 @@ struct __file_s;
#
# Fix 49: Lynx_Void_Int
# Fix 50: Lynx_Void_Int
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
......@@ -1535,7 +1698,7 @@ struct __file_s;
#
# Fix 50: Lynxos_Fcntl_Proto
# Fix 51: Lynxos_Fcntl_Proto
#
case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
......@@ -1556,7 +1719,7 @@ struct __file_s;
#
# Fix 51: M88k_Bad_Hypot_Opt
# Fix 52: M88k_Bad_Hypot_Opt
#
case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
......@@ -1591,7 +1754,7 @@ static __inline__ double fake_hypot (x, y)\
#
# Fix 52: M88k_Bad_S_If
# Fix 53: M88k_Bad_S_If
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
......@@ -1616,7 +1779,7 @@ static __inline__ double fake_hypot (x, y)\
#
# Fix 53: M88k_Multi_Incl
# Fix 54: M88k_Multi_Incl
#
case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
......@@ -1650,7 +1813,7 @@ static __inline__ double fake_hypot (x, y)\
#
# Fix 54: Machine_Name
# Fix 55: Machine_Name
#
if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' ${file}`"
) > /dev/null 2>&1 ; then
......@@ -1702,7 +1865,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 55: Math_Exception
# Fix 56: Math_Exception
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`"
......@@ -1742,7 +1905,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 56: Math_Gcc_Ifndefs
# Fix 57: Math_Gcc_Ifndefs
#
case "${file}" in ./math.h )
fixlist="${fixlist}
......@@ -1776,7 +1939,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 57: Nested_Comment
# Fix 58: Nested_Comment
#
case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist}
......@@ -1794,7 +1957,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 58: News_Os_Recursion
# Fix 59: News_Os_Recursion
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
......@@ -1820,7 +1983,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 59: Next_Math_Prefix
# Fix 60: Next_Math_Prefix
#
case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
......@@ -1845,7 +2008,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 60: Next_Template
# Fix 61: Next_Template
#
case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`"
......@@ -1867,7 +2030,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 61: Next_Volitile
# Fix 62: Next_Volitile
#
case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`"
......@@ -1889,7 +2052,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 62: Next_Wait_Union
# Fix 63: Next_Wait_Union
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`"
......@@ -1910,7 +2073,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 63: Nodeent_Syntax
# Fix 64: Nodeent_Syntax
#
case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist}
......@@ -1928,7 +2091,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 64: Osf_Namespace_A
# Fix 65: Osf_Namespace_A
#
case "${file}" in ./reg_types.h | \
./sys/lc_core.h )
......@@ -1955,7 +2118,7 @@ s/\\+++fixinc_eol+++/\\/g
#
# Fix 65: Osf_Namespace_B
# Fix 66: Osf_Namespace_B
#
case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \
......@@ -1983,7 +2146,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 66: Pthread_Page_Size
# Fix 67: Pthread_Page_Size
#
case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`"
......@@ -2004,7 +2167,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 67: Read_Ret_Type
# Fix 68: Read_Ret_Type
#
case "${file}" in ./stdio.h )
if ( test -n "`egrep 'extern int .*, fread\\(\\), fwrite\\(\\)' ${file}`"
......@@ -2026,7 +2189,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 68: Rs6000_Double
# Fix 69: Rs6000_Double
#
case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
......@@ -2052,7 +2215,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 69: Rs6000_Fchmod
# Fix 70: Rs6000_Fchmod
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`"
......@@ -2073,7 +2236,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 70: Rs6000_Param
# Fix 71: Rs6000_Param
#
case "${file}" in ./stdio.h | \
./unistd.h )
......@@ -2092,7 +2255,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 71: Sony_Include
# Fix 72: Sony_Include
#
case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
......@@ -2113,7 +2276,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 72: Statsswtch
# Fix 73: Statsswtch
#
case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`"
......@@ -2134,7 +2297,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 73: Stdio_Va_List
# Fix 74: Stdio_Va_List
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
......@@ -2173,7 +2336,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 74: Sun_Bogus_Ifdef
# Fix 75: Sun_Bogus_Ifdef
#
case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h )
......@@ -2195,7 +2358,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 75: Sun_Bogus_Ifdef_Sun4c
# Fix 76: Sun_Bogus_Ifdef_Sun4c
#
case "${file}" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`"
......@@ -2216,7 +2379,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 76: Sun_Catmacro
# Fix 77: Sun_Catmacro
#
case "${file}" in ./pixrect/memvar.h )
if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
......@@ -2244,7 +2407,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 77: Sun_Malloc
# Fix 78: Sun_Malloc
#
case "${file}" in ./malloc.h )
fixlist="${fixlist}
......@@ -2265,7 +2428,7 @@ typedef __regmatch_t regmatch_t;
#
# Fix 78: Sun_Memcpy
# Fix 79: Sun_Memcpy
#
case "${file}" in ./memory.h )
if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`"
......@@ -2307,7 +2470,7 @@ extern int memcmp();\
#
# Fix 79: Sun_Rusers_Semi
# Fix 80: Sun_Rusers_Semi
#
case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`"
......@@ -2328,7 +2491,7 @@ extern int memcmp();\
#
# Fix 80: Sun_Signal
# Fix 81: Sun_Signal
#
case "${file}" in ./sys/signal.h | \
./signal.h )
......@@ -2357,7 +2520,7 @@ void (*signal(...))(...);\
#
# Fix 81: Sun_Auth_Proto
# Fix 82: Sun_Auth_Proto
#
case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \
......@@ -2386,7 +2549,7 @@ void (*signal(...))(...);\
#
# Fix 82: Sunos_Matherr_Decl
# Fix 83: Sunos_Matherr_Decl
#
case "${file}" in ./math.h )
fixlist="${fixlist}
......@@ -2407,7 +2570,7 @@ struct exception;
#
# Fix 83: Sunos_Strlen
# Fix 84: Sunos_Strlen
#
case "${file}" in ./strings.h )
fixlist="${fixlist}
......@@ -2425,7 +2588,7 @@ struct exception;
#
# Fix 84: Systypes
# Fix 85: Systypes
#
case "${file}" in ./sys/types.h | \
./stdlib.h | \
......@@ -2479,7 +2642,7 @@ typedef __SIZE_TYPE__ size_t;\
#
# Fix 85: Systypes_For_Aix
# Fix 86: Systypes_For_Aix
#
case "${file}" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`"
......@@ -2510,7 +2673,7 @@ typedef __SIZE_TYPE__ size_t;\
#
# Fix 86: Sysv68_String
# Fix 87: Sysv68_String
#
case "${file}" in ./string.h )
fixlist="${fixlist}
......@@ -2538,7 +2701,7 @@ extern unsigned int\
#
# Fix 87: Sysz_Stdlib_For_Sun
# Fix 88: Sysz_Stdlib_For_Sun
#
case "${file}" in ./stdlib.h )
fixlist="${fixlist}
......@@ -2569,7 +2732,7 @@ extern unsigned int\
#
# Fix 88: Sysz_Stdtypes_For_Sun
# Fix 89: Sysz_Stdtypes_For_Sun
#
case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist}
......@@ -2607,7 +2770,7 @@ extern unsigned int\
#
# Fix 89: Tinfo_Cplusplus
# Fix 90: Tinfo_Cplusplus
#
case "${file}" in ./tinfo.h )
fixlist="${fixlist}
......@@ -2625,7 +2788,7 @@ extern unsigned int\
#
# Fix 90: Ultrix_Ansi_Compat
# Fix 91: Ultrix_Ansi_Compat
#
case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
......@@ -2649,7 +2812,7 @@ extern unsigned int\
#
# Fix 91: Ultrix_Fix_Fixproto
# Fix 92: Ultrix_Fix_Fixproto
#
case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
......@@ -2672,7 +2835,7 @@ struct utsname;
#
# Fix 92: Ultrix_Atof_Param
# Fix 93: Ultrix_Atof_Param
#
case "${file}" in ./math.h )
fixlist="${fixlist}
......@@ -2694,7 +2857,7 @@ struct utsname;
#
# Fix 93: Ultrix_Const
# Fix 94: Ultrix_Const
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
......@@ -2720,7 +2883,7 @@ struct utsname;
#
# Fix 94: Ultrix_Ifdef
# Fix 95: Ultrix_Ifdef
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
......@@ -2741,7 +2904,7 @@ struct utsname;
#
# Fix 95: Ultrix_Nested_Cmnt
# Fix 96: Ultrix_Nested_Cmnt
#
case "${file}" in ./rpc/svc.h )
fixlist="${fixlist}
......@@ -2759,7 +2922,7 @@ struct utsname;
#
# Fix 96: Ultrix_Static
# Fix 97: Ultrix_Static
#
case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
......@@ -2782,7 +2945,7 @@ struct utsname;
#
# Fix 97: Undefine_Null
# Fix 98: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`"
) > /dev/null 2>&1 ; then
......@@ -2806,7 +2969,37 @@ struct utsname;
#
# Fix 98: Va_I960_Macro
# Fix 99: Unixware7_Byteorder_Fix
#
case "${file}" in ./arpa/inet.h )
case "$target_canonical" in *-*-sysv4* | \
i[34567]86-*-sysv5* | \
i[34567]86-*-udk* | \
i[34567]86-*-solaris2.[0-4] | \
powerpcle-*-solaris2.[0-4] | \
sparc-*-solaris2.[0-4] )
if ( test -n "`egrep 'in_port_t' ${file}`"
) > /dev/null 2>&1 ; then
fixlist="${fixlist}
unixware7_byteorder_fix"
if [ ! -r ${DESTFILE} ]
then infile=${file}
else infile=${DESTFILE} ; fi
sed -e '/^extern.*htons.*(in_port_t)/d' \
-e '/^extern.*ntohs.*(in_port_t)/d' \
< $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 100: Va_I960_Macro
#
case "${file}" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`"
......@@ -2830,7 +3023,7 @@ struct utsname;
#
# Fix 99: Void_Null
# Fix 101: Void_Null
#
case "${file}" in ./curses.h | \
./dbm.h | \
......@@ -2861,7 +3054,7 @@ struct utsname;
#
# Fix 100: Vxworks_Gcc_Problem
# Fix 102: Vxworks_Gcc_Problem
#
case "${file}" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`"
......@@ -2903,7 +3096,7 @@ struct utsname;
#
# Fix 101: Vxworks_Needs_Vxtypes
# Fix 103: Vxworks_Needs_Vxtypes
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`"
......@@ -2924,7 +3117,7 @@ struct utsname;
#
# Fix 102: Vxworks_Needs_Vxworks
# Fix 104: Vxworks_Needs_Vxworks
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`"
......@@ -2952,7 +3145,7 @@ struct utsname;
#
# Fix 103: Vxworks_Time
# Fix 105: Vxworks_Time
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`"
......@@ -2986,7 +3179,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
# Fix 104: X11_Class
# Fix 106: X11_Class
#
case "${file}" in ./X11/ShellP.h )
if ( test -a \
......@@ -3015,7 +3208,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
# Fix 105: X11_Class_Usage
# Fix 107: X11_Class_Usage
#
case "${file}" in ./Xm/BaseClassI.h )
if ( test -a \
......@@ -3037,7 +3230,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
# Fix 106: X11_New
# Fix 108: X11_New
#
case "${file}" in ./Xm/Traversal.h )
if ( test -a \
......@@ -3067,7 +3260,7 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#
# Fix 107: X11_Sprintf
# Fix 109: X11_Sprintf
#
case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment