+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.
# 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.
#
* 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.
*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * 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";
/*
*
* Description of Aix_Volatile fix
*/
-#define AIX_VOLATILE_FIXIDX 8
+#define AIX_VOLATILE_FIXIDX 9
tSCC zAix_VolatileName[] =
"Aix_Volatile";
/*
*
* Description of Alpha_Getopt fix
*/
-#define ALPHA_GETOPT_FIXIDX 9
+#define ALPHA_GETOPT_FIXIDX 10
tSCC zAlpha_GetoptName[] =
"Alpha_Getopt";
/*
*
* Description of Alpha_Parens fix
*/
-#define ALPHA_PARENS_FIXIDX 10
+#define ALPHA_PARENS_FIXIDX 11
tSCC zAlpha_ParensName[] =
"Alpha_Parens";
/*
*
* Description of Alpha_Sbrk fix
*/
-#define ALPHA_SBRK_FIXIDX 11
+#define ALPHA_SBRK_FIXIDX 12
tSCC zAlpha_SbrkName[] =
"Alpha_Sbrk";
/*
*
* 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";
/*
*
* Description of Arm_Wchar fix
*/
-#define ARM_WCHAR_FIXIDX 13
+#define ARM_WCHAR_FIXIDX 14
tSCC zArm_WcharName[] =
"Arm_Wchar";
/*
*
* Description of Aux_Asm fix
*/
-#define AUX_ASM_FIXIDX 14
+#define AUX_ASM_FIXIDX 15
tSCC zAux_AsmName[] =
"Aux_Asm";
/*
*
* Description of Avoid_Bool fix
*/
-#define AVOID_BOOL_FIXIDX 15
+#define AVOID_BOOL_FIXIDX 16
tSCC zAvoid_BoolName[] =
"Avoid_Bool";
/*
*
* 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";
/*
*
* Description of Badquote fix
*/
-#define BADQUOTE_FIXIDX 17
+#define BADQUOTE_FIXIDX 18
tSCC zBadquoteName[] =
"Badquote";
/*
*
* Description of Bad_Lval fix
*/
-#define BAD_LVAL_FIXIDX 18
+#define BAD_LVAL_FIXIDX 19
tSCC zBad_LvalName[] =
"Bad_Lval";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Ecd_Cursor fix
*/
-#define ECD_CURSOR_FIXIDX 24
+#define ECD_CURSOR_FIXIDX 25
tSCC zEcd_CursorName[] =
"Ecd_Cursor";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Hp_Inline fix
*/
-#define HP_INLINE_FIXIDX 27
+#define HP_INLINE_FIXIDX 28
tSCC zHp_InlineName[] =
"Hp_Inline";
/*
*
* Description of Hp_Sysfile fix
*/
-#define HP_SYSFILE_FIXIDX 28
+#define HP_SYSFILE_FIXIDX 29
tSCC zHp_SysfileName[] =
"Hp_Sysfile";
/*
*
* Description of Cxx_Unready fix
*/
-#define CXX_UNREADY_FIXIDX 29
+#define CXX_UNREADY_FIXIDX 30
tSCC zCxx_UnreadyName[] =
"Cxx_Unready";
/*
*
* Description of Hpux_Maxint fix
*/
-#define HPUX_MAXINT_FIXIDX 30
+#define HPUX_MAXINT_FIXIDX 31
tSCC zHpux_MaxintName[] =
"Hpux_Maxint";
/*
*
* Description of Hpux_Systime fix
*/
-#define HPUX_SYSTIME_FIXIDX 31
+#define HPUX_SYSTIME_FIXIDX 32
tSCC zHpux_SystimeName[] =
"Hpux_Systime";
/*
*
* 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";
/*
*
* Description of Interactv_Add1 fix
*/
-#define INTERACTV_ADD1_FIXIDX 33
+#define INTERACTV_ADD1_FIXIDX 34
tSCC zInteractv_Add1Name[] =
"Interactv_Add1";
/*
*
* Description of Interactv_Add2 fix
*/
-#define INTERACTV_ADD2_FIXIDX 34
+#define INTERACTV_ADD2_FIXIDX 35
tSCC zInteractv_Add2Name[] =
"Interactv_Add2";
/*
*
* Description of Interactv_Add3 fix
*/
-#define INTERACTV_ADD3_FIXIDX 35
+#define INTERACTV_ADD3_FIXIDX 36
tSCC zInteractv_Add3Name[] =
"Interactv_Add3";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Irix_Sockaddr fix
*/
-#define IRIX_SOCKADDR_FIXIDX 40
+#define IRIX_SOCKADDR_FIXIDX 41
tSCC zIrix_SockaddrName[] =
"Irix_Sockaddr";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Isc_Fmod fix
*/
-#define ISC_FMOD_FIXIDX 43
+#define ISC_FMOD_FIXIDX 44
tSCC zIsc_FmodName[] =
"Isc_Fmod";
/*
*
* Description of Motorola_Nested fix
*/
-#define MOTOROLA_NESTED_FIXIDX 44
+#define MOTOROLA_NESTED_FIXIDX 45
tSCC zMotorola_NestedName[] =
"Motorola_Nested";
/*
*
* 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";
/*
*
* Description of Kandr_Concat fix
*/
-#define KANDR_CONCAT_FIXIDX 46
+#define KANDR_CONCAT_FIXIDX 47
tSCC zKandr_ConcatName[] =
"Kandr_Concat";
/*
*
* Description of Limits_Ifndefs fix
*/
-#define LIMITS_IFNDEFS_FIXIDX 47
+#define LIMITS_IFNDEFS_FIXIDX 48
tSCC zLimits_IfndefsName[] =
"Limits_Ifndefs";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Machine_Name fix
*/
-#define MACHINE_NAME_FIXIDX 53
+#define MACHINE_NAME_FIXIDX 54
tSCC zMachine_NameName[] =
"Machine_Name";
/*
*
* Description of Math_Exception fix
*/
-#define MATH_EXCEPTION_FIXIDX 54
+#define MATH_EXCEPTION_FIXIDX 55
tSCC zMath_ExceptionName[] =
"Math_Exception";
/*
*
* 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";
/*
*
* Description of Nested_Comment fix
*/
-#define NESTED_COMMENT_FIXIDX 56
+#define NESTED_COMMENT_FIXIDX 57
tSCC zNested_CommentName[] =
"Nested_Comment";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Next_Template fix
*/
-#define NEXT_TEMPLATE_FIXIDX 59
+#define NEXT_TEMPLATE_FIXIDX 60
tSCC zNext_TemplateName[] =
"Next_Template";
/*
*
* Description of Next_Volitile fix
*/
-#define NEXT_VOLITILE_FIXIDX 60
+#define NEXT_VOLITILE_FIXIDX 61
tSCC zNext_VolitileName[] =
"Next_Volitile";
/*
*
* 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";
/*
*
* Description of Nodeent_Syntax fix
*/
-#define NODEENT_SYNTAX_FIXIDX 62
+#define NODEENT_SYNTAX_FIXIDX 63
tSCC zNodeent_SyntaxName[] =
"Nodeent_Syntax";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Rs6000_Double fix
*/
-#define RS6000_DOUBLE_FIXIDX 67
+#define RS6000_DOUBLE_FIXIDX 68
tSCC zRs6000_DoubleName[] =
"Rs6000_Double";
/*
*
* Description of Rs6000_Fchmod fix
*/
-#define RS6000_FCHMOD_FIXIDX 68
+#define RS6000_FCHMOD_FIXIDX 69
tSCC zRs6000_FchmodName[] =
"Rs6000_Fchmod";
/*
*
* Description of Rs6000_Param fix
*/
-#define RS6000_PARAM_FIXIDX 69
+#define RS6000_PARAM_FIXIDX 70
tSCC zRs6000_ParamName[] =
"Rs6000_Param";
/*
*
* Description of Sony_Include fix
*/
-#define SONY_INCLUDE_FIXIDX 70
+#define SONY_INCLUDE_FIXIDX 71
tSCC zSony_IncludeName[] =
"Sony_Include";
/*
*
* Description of Statsswtch fix
*/
-#define STATSSWTCH_FIXIDX 71
+#define STATSSWTCH_FIXIDX 72
tSCC zStatsswtchName[] =
"Statsswtch";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Sun_Catmacro fix
*/
-#define SUN_CATMACRO_FIXIDX 75
+#define SUN_CATMACRO_FIXIDX 76
tSCC zSun_CatmacroName[] =
"Sun_Catmacro";
/*
*
* Description of Sun_Malloc fix
*/
-#define SUN_MALLOC_FIXIDX 76
+#define SUN_MALLOC_FIXIDX 77
tSCC zSun_MallocName[] =
"Sun_Malloc";
/*
*
* Description of Sun_Memcpy fix
*/
-#define SUN_MEMCPY_FIXIDX 77
+#define SUN_MEMCPY_FIXIDX 78
tSCC zSun_MemcpyName[] =
"Sun_Memcpy";
/*
*
* 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";
/*
*
* Description of Sun_Signal fix
*/
-#define SUN_SIGNAL_FIXIDX 79
+#define SUN_SIGNAL_FIXIDX 80
tSCC zSun_SignalName[] =
"Sun_Signal";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Sunos_Strlen fix
*/
-#define SUNOS_STRLEN_FIXIDX 82
+#define SUNOS_STRLEN_FIXIDX 83
tSCC zSunos_StrlenName[] =
"Sunos_Strlen";
/*
*
* Description of Systypes fix
*/
-#define SYSTYPES_FIXIDX 83
+#define SYSTYPES_FIXIDX 84
tSCC zSystypesName[] =
"Systypes";
/*
*
* 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";
/*
*
* Description of Sysv68_String fix
*/
-#define SYSV68_STRING_FIXIDX 85
+#define SYSV68_STRING_FIXIDX 86
tSCC zSysv68_StringName[] =
"Sysv68_String";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Tinfo_Cplusplus fix
*/
-#define TINFO_CPLUSPLUS_FIXIDX 88
+#define TINFO_CPLUSPLUS_FIXIDX 89
tSCC zTinfo_CplusplusName[] =
"Tinfo_Cplusplus";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Ultrix_Const fix
*/
-#define ULTRIX_CONST_FIXIDX 92
+#define ULTRIX_CONST_FIXIDX 93
tSCC zUltrix_ConstName[] =
"Ultrix_Const";
/*
*
* Description of Ultrix_Ifdef fix
*/
-#define ULTRIX_IFDEF_FIXIDX 93
+#define ULTRIX_IFDEF_FIXIDX 94
tSCC zUltrix_IfdefName[] =
"Ultrix_Ifdef";
/*
*
* 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";
/*
*
* Description of Ultrix_Static fix
*/
-#define ULTRIX_STATIC_FIXIDX 95
+#define ULTRIX_STATIC_FIXIDX 96
tSCC zUltrix_StaticName[] =
"Ultrix_Static";
/*
*
* Description of Undefine_Null fix
*/
-#define UNDEFINE_NULL_FIXIDX 96
+#define UNDEFINE_NULL_FIXIDX 97
tSCC zUndefine_NullName[] =
"Undefine_Null";
/*
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
+ * 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";
/*
*
* Description of Void_Null fix
*/
-#define VOID_NULL_FIXIDX 98
+#define VOID_NULL_FIXIDX 100
tSCC zVoid_NullName[] =
"Void_Null";
/*
*
* 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";
/*
*
* 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";
/*
*
* 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";
/*
*
* Description of Vxworks_Time fix
*/
-#define VXWORKS_TIME_FIXIDX 102
+#define VXWORKS_TIME_FIXIDX 104
tSCC zVxworks_TimeName[] =
"Vxworks_Time";
/*
*
* Description of X11_Class fix
*/
-#define X11_CLASS_FIXIDX 103
+#define X11_CLASS_FIXIDX 105
tSCC zX11_ClassName[] =
"X11_Class";
/*
*
* 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";
/*
*
* Description of X11_New fix
*/
-#define X11_NEW_FIXIDX 105
+#define X11_NEW_FIXIDX 107
tSCC zX11_NewName[] =
"X11_New";
/*
*
* Description of X11_Sprintf fix
*/
-#define X11_SPRINTF_FIXIDX 106
+#define X11_SPRINTF_FIXIDX 108
tSCC zX11_SprintfName[] =
"X11_Sprintf";
/*
*
* 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,
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,
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,
Now, first: DO NOT DO BROKEN FIXES (empty replacement fixes) */
+
/*
* Purge some HP-UX 11 files that are only borken after they are "fixed".
*/
/*
+ * 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.
*/
};
#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"
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
};
#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>.
};
#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
/*
+ * 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 = {
# 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.
#
#
- # 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}`"
#
- # 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}`"
#
- # Fix 10: Alpha_Getopt
+ # Fix 11: Alpha_Getopt
#
case "${file}" in ./stdio.h | \
./stdlib.h )
#
- # Fix 11: Alpha_Parens
+ # Fix 12: Alpha_Parens
#
case "${file}" in ./sym.h )
if ( test -n "`egrep '#ifndef\\(__mips64\\)' ${file}`"
#
- # Fix 12: Alpha_Sbrk
+ # Fix 13: Alpha_Sbrk
#
case "${file}" in ./unistd.h )
if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' ${file}`"
#
- # Fix 13: Arm_Norcroft_Hint
+ # Fix 14: Arm_Norcroft_Hint
#
case "${file}" in ./X11/Intrinsic.h )
if ( test -n "`egrep '___type p_type' ${file}`"
#
- # Fix 14: Arm_Wchar
+ # Fix 15: Arm_Wchar
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' ${file}`"
#
- # Fix 15: Aux_Asm
+ # Fix 16: Aux_Asm
#
case "${file}" in ./sys/param.h )
if ( test -n "`egrep '#ifndef NOINLINE' ${file}`"
#
- # Fix 16: Avoid_Bool
+ # Fix 17: Avoid_Bool
#
case "${file}" in ./curses.h | \
./curses_colr/curses.h | \
#
- # Fix 17: Bad_Struct_Term
+ # Fix 18: Bad_Struct_Term
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' ${file}`"
#
- # Fix 18: Badquote
+ # Fix 19: Badquote
#
case "${file}" in ./sundev/vuid_event.h )
fixlist="${fixlist}
#
- # Fix 19: Bad_Lval
+ # Fix 20: Bad_Lval
#
case "${file}" in ./libgen.h | \
./dirent.h | \
#
- # Fix 20: Broken_Assert_Stdio
+ # Fix 21: Broken_Assert_Stdio
#
case "${file}" in ./assert.h )
if ( test -n "`egrep 'stderr' ${file}`"
#
- # Fix 21: Broken_Assert_Stdlib
+ # Fix 22: Broken_Assert_Stdlib
#
case "${file}" in ./assert.h )
if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`"
#
- # Fix 22: Bsd43_Io_Macros
+ # Fix 23: Bsd43_Io_Macros
#
if ( test -n "`egrep 'BSD43__IO' ${file}`"
) > /dev/null 2>&1 ; then
#
- # Fix 23: Dec_Intern_Asm
+ # Fix 24: Dec_Intern_Asm
#
case "${file}" in ./c_asm.h )
fixlist="${fixlist}
#
- # Fix 24: No_Double_Slash
+ # Fix 25: No_Double_Slash
#
if ${FIXTESTS} ${file} double_slash
then
#
- # Fix 25: Ecd_Cursor
+ # Fix 26: Ecd_Cursor
#
case "${file}" in ./sunwindow/win_lock.h | \
./sunwindow/win_cursor.h )
#
- # Fix 26: Sco5_Stat_Wrappers
+ # Fix 27: Sco5_Stat_Wrappers
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in i*86-*-sco3.2v5* )
#
- # Fix 27: End_Else_Label
+ # Fix 28: End_Else_Label
#
if ${FIXTESTS} ${file} else_endif_label
then
#
- # Fix 28: Hp_Inline
+ # Fix 29: Hp_Inline
#
case "${file}" in ./sys/spinlock.h )
if ( test -n "`egrep 'include.*\"\\.\\./machine/' ${file}`"
#
- # Fix 29: Hp_Sysfile
+ # Fix 30: Hp_Sysfile
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep 'HPUX_SOURCE' ${file}`"
#
- # Fix 30: Cxx_Unready
+ # Fix 31: Cxx_Unready
#
case "${file}" in ./sys/mman.h | \
./rpc/types.h )
#
- # Fix 31: Hpux_Maxint
+ # Fix 32: Hpux_Maxint
#
case "${file}" in ./sys/param.h )
fixlist="${fixlist}
#
- # Fix 32: Hpux_Systime
+ # Fix 33: Hpux_Systime
#
case "${file}" in ./sys/time.h )
if ( test -n "`egrep '^extern struct sigevent;' ${file}`"
#
- # 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}`"
#
- # Fix 34: Interactv_Add1
+ # Fix 35: Interactv_Add1
#
case "${file}" in ./stdio.h | \
./math.h | \
#
- # Fix 35: Interactv_Add2
+ # Fix 36: Interactv_Add2
#
case "${file}" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
#
- # Fix 36: Interactv_Add3
+ # Fix 37: Interactv_Add3
#
case "${file}" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \
#
- # Fix 37: Io_Def_Quotes
+ # Fix 38: Io_Def_Quotes
#
if ( test -n "`egrep '[ ]*[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`"
) > /dev/null 2>&1 ; then
#
- # Fix 38: Ioctl_Fix_Ctrl
+ # Fix 39: Ioctl_Fix_Ctrl
#
if ( test -n "`egrep 'CTRL[ ]*\\(' ${file}`"
) > /dev/null 2>&1 ; then
#
- # Fix 39: Ip_Missing_Semi
+ # Fix 40: Ip_Missing_Semi
#
case "${file}" in ./netinet/ip.h )
fixlist="${fixlist}
#
- # Fix 40: Irix_Multiline_Cmnt
+ # Fix 41: Irix_Multiline_Cmnt
#
case "${file}" in ./sys/types.h )
fixlist="${fixlist}
#
- # Fix 41: Irix_Sockaddr
+ # Fix 42: Irix_Sockaddr
#
case "${file}" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`"
#
- # Fix 42: Irix_Struct__File
+ # Fix 43: Irix_Struct__File
#
case "${file}" in ./rpc/xdr.h )
fixlist="${fixlist}
#
- # Fix 43: Irix_Asm_Apostrophe
+ # Fix 44: Irix_Asm_Apostrophe
#
case "${file}" in ./sys/asm.h )
if ( test -n "`egrep '^[ ]*#.*[Ww]e'\\''re' ${file}`"
#
- # Fix 44: Isc_Fmod
+ # Fix 45: Isc_Fmod
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' ${file}`"
#
- # Fix 45: Motorola_Nested
+ # Fix 46: Motorola_Nested
#
case "${file}" in ./limits.h | \
./sys/limits.h )
#
- # Fix 46: Isc_Sys_Limits
+ # Fix 47: Isc_Sys_Limits
#
case "${file}" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' ${file}`"
#
- # Fix 47: Kandr_Concat
+ # Fix 48: Kandr_Concat
#
case "${file}" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \
#
- # Fix 48: Limits_Ifndefs
+ # Fix 49: Limits_Ifndefs
#
case "${file}" in ./limits.h | \
./sys/limits.h )
#
- # Fix 49: Lynx_Void_Int
+ # Fix 50: Lynx_Void_Int
#
case "${file}" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`"
#
- # Fix 50: Lynxos_Fcntl_Proto
+ # Fix 51: Lynxos_Fcntl_Proto
#
case "${file}" in ./fcntl.h )
if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`"
#
- # Fix 51: M88k_Bad_Hypot_Opt
+ # Fix 52: M88k_Bad_Hypot_Opt
#
case "${file}" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
#
- # Fix 52: M88k_Bad_S_If
+ # Fix 53: M88k_Bad_S_If
#
case "${file}" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
#
- # Fix 53: M88k_Multi_Incl
+ # Fix 54: M88k_Multi_Incl
#
case "${file}" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
#
- # 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
#
- # Fix 55: Math_Exception
+ # Fix 56: Math_Exception
#
case "${file}" in ./math.h )
if ( test -n "`egrep 'struct exception' ${file}`"
#
- # Fix 56: Math_Gcc_Ifndefs
+ # Fix 57: Math_Gcc_Ifndefs
#
case "${file}" in ./math.h )
fixlist="${fixlist}
#
- # Fix 57: Nested_Comment
+ # Fix 58: Nested_Comment
#
case "${file}" in ./rpc/rpc.h )
fixlist="${fixlist}
#
- # Fix 58: News_Os_Recursion
+ # Fix 59: News_Os_Recursion
#
case "${file}" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' ${file}`"
#
- # Fix 59: Next_Math_Prefix
+ # Fix 60: Next_Math_Prefix
#
case "${file}" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`"
#
- # Fix 60: Next_Template
+ # Fix 61: Next_Template
#
case "${file}" in ./bsd/libc.h )
if ( test -n "`egrep 'template' ${file}`"
#
- # Fix 61: Next_Volitile
+ # Fix 62: Next_Volitile
#
case "${file}" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' ${file}`"
#
- # Fix 62: Next_Wait_Union
+ # Fix 63: Next_Wait_Union
#
case "${file}" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' ${file}`"
#
- # Fix 63: Nodeent_Syntax
+ # Fix 64: Nodeent_Syntax
#
case "${file}" in ./netdnet/dnetdb.h )
fixlist="${fixlist}
#
- # Fix 64: Osf_Namespace_A
+ # Fix 65: Osf_Namespace_A
#
case "${file}" in ./reg_types.h | \
./sys/lc_core.h )
#
- # Fix 65: Osf_Namespace_B
+ # Fix 66: Osf_Namespace_B
#
case "${file}" in ./regex.h )
if ( test '(' -r reg_types.h ')' -a \
#
- # Fix 66: Pthread_Page_Size
+ # Fix 67: Pthread_Page_Size
#
case "${file}" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' ${file}`"
#
- # Fix 67: Read_Ret_Type
+ # Fix 68: Read_Ret_Type
#
case "${file}" in ./stdio.h )
if ( test -n "`egrep 'extern int .*, fread\\(\\), fwrite\\(\\)' ${file}`"
#
- # Fix 68: Rs6000_Double
+ # Fix 69: Rs6000_Double
#
case "${file}" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`"
#
- # Fix 69: Rs6000_Fchmod
+ # Fix 70: Rs6000_Fchmod
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' ${file}`"
#
- # Fix 70: Rs6000_Param
+ # Fix 71: Rs6000_Param
#
case "${file}" in ./stdio.h | \
./unistd.h )
#
- # Fix 71: Sony_Include
+ # Fix 72: Sony_Include
#
case "${file}" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`"
#
- # Fix 72: Statsswtch
+ # Fix 73: Statsswtch
#
case "${file}" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' ${file}`"
#
- # Fix 73: Stdio_Va_List
+ # Fix 74: Stdio_Va_List
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
#
- # Fix 74: Sun_Bogus_Ifdef
+ # Fix 75: Sun_Bogus_Ifdef
#
case "${file}" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h )
#
- # 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}`"
#
- # Fix 76: Sun_Catmacro
+ # Fix 77: Sun_Catmacro
#
case "${file}" in ./pixrect/memvar.h )
if ( test -n "`egrep '^#define[ ]+CAT\\(a,b\\)' ${file}`"
#
- # Fix 77: Sun_Malloc
+ # Fix 78: Sun_Malloc
#
case "${file}" in ./malloc.h )
fixlist="${fixlist}
#
- # 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}`"
#
- # Fix 79: Sun_Rusers_Semi
+ # Fix 80: Sun_Rusers_Semi
#
case "${file}" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' ${file}`"
#
- # Fix 80: Sun_Signal
+ # Fix 81: Sun_Signal
#
case "${file}" in ./sys/signal.h | \
./signal.h )
#
- # Fix 81: Sun_Auth_Proto
+ # Fix 82: Sun_Auth_Proto
#
case "${file}" in ./rpc/auth.h | \
./rpc/clnt.h | \
#
- # Fix 82: Sunos_Matherr_Decl
+ # Fix 83: Sunos_Matherr_Decl
#
case "${file}" in ./math.h )
fixlist="${fixlist}
#
- # Fix 83: Sunos_Strlen
+ # Fix 84: Sunos_Strlen
#
case "${file}" in ./strings.h )
fixlist="${fixlist}
#
- # Fix 84: Systypes
+ # Fix 85: Systypes
#
case "${file}" in ./sys/types.h | \
./stdlib.h | \
#
- # 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}`"
#
- # Fix 86: Sysv68_String
+ # Fix 87: Sysv68_String
#
case "${file}" in ./string.h )
fixlist="${fixlist}
#
- # Fix 87: Sysz_Stdlib_For_Sun
+ # Fix 88: Sysz_Stdlib_For_Sun
#
case "${file}" in ./stdlib.h )
fixlist="${fixlist}
#
- # Fix 88: Sysz_Stdtypes_For_Sun
+ # Fix 89: Sysz_Stdtypes_For_Sun
#
case "${file}" in ./sys/stdtypes.h )
fixlist="${fixlist}
#
- # Fix 89: Tinfo_Cplusplus
+ # Fix 90: Tinfo_Cplusplus
#
case "${file}" in ./tinfo.h )
fixlist="${fixlist}
#
- # Fix 90: Ultrix_Ansi_Compat
+ # Fix 91: Ultrix_Ansi_Compat
#
case "${file}" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
#
- # Fix 91: Ultrix_Fix_Fixproto
+ # Fix 92: Ultrix_Fix_Fixproto
#
case "${file}" in ./sys/utsname.h )
if ( test -n "`egrep 'ULTRIX' ${file}`"
#
- # Fix 92: Ultrix_Atof_Param
+ # Fix 93: Ultrix_Atof_Param
#
case "${file}" in ./math.h )
fixlist="${fixlist}
#
- # Fix 93: Ultrix_Const
+ # Fix 94: Ultrix_Const
#
case "${file}" in ./stdio.h )
fixlist="${fixlist}
#
- # Fix 94: Ultrix_Ifdef
+ # Fix 95: Ultrix_Ifdef
#
case "${file}" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' ${file}`"
#
- # Fix 95: Ultrix_Nested_Cmnt
+ # Fix 96: Ultrix_Nested_Cmnt
#
case "${file}" in ./rpc/svc.h )
fixlist="${fixlist}
#
- # Fix 96: Ultrix_Static
+ # Fix 97: Ultrix_Static
#
case "${file}" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`"
#
- # Fix 97: Undefine_Null
+ # Fix 98: Undefine_Null
#
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`"
) > /dev/null 2>&1 ; then
#
- # 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}`"
#
- # Fix 99: Void_Null
+ # Fix 101: Void_Null
#
case "${file}" in ./curses.h | \
./dbm.h | \
#
- # 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}`"
#
- # 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}`"
#
- # Fix 102: Vxworks_Needs_Vxworks
+ # Fix 104: Vxworks_Needs_Vxworks
#
case "${file}" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`"
#
- # Fix 103: Vxworks_Time
+ # Fix 105: Vxworks_Time
#
case "${file}" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`"
#
- # Fix 104: X11_Class
+ # Fix 106: X11_Class
#
case "${file}" in ./X11/ShellP.h )
if ( test -a \
#
- # Fix 105: X11_Class_Usage
+ # Fix 107: X11_Class_Usage
#
case "${file}" in ./Xm/BaseClassI.h )
if ( test -a \
#
- # Fix 106: X11_New
+ # Fix 108: X11_New
#
case "${file}" in ./Xm/Traversal.h )
if ( test -a \
#
- # Fix 107: X11_Sprintf
+ # Fix 109: X11_Sprintf
#
case "${file}" in ./X11*/Xmu.h )
fixlist="${fixlist}