diff --git a/contrib/fixinc/fixincl.c b/contrib/fixinc/fixincl.c index e10ae7e98ca..62a5892b548 100644 --- a/contrib/fixinc/fixincl.c +++ b/contrib/fixinc/fixincl.c @@ -1,5 +1,5 @@ /* - * $Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $ + * $Id: fixincl.c,v 1.4 1998/08/05 10:20:11 korbb Exp $ * * Install modified versions of certain ANSI-incompatible system header * files which are fixed to work correctly with ANSI C and placed in a @@ -28,7 +28,6 @@ #include #include #include -#include #include #include #include @@ -36,8 +35,6 @@ #include #include #include -#include -#include #include #include @@ -138,7 +135,7 @@ main (argc, argv) if (strcmp (argv[1], "-v") == 0) { - fputs ("$Id: fixincl.c,v 1.1 1998/03/20 16:19:41 korbb Exp $\n", stderr); + fputs ("$Id: fixincl.c,v 1.3 1998/06/02 07:00:12 korbb Exp $\n", stderr); exit (EXIT_SUCCESS); } @@ -448,17 +445,18 @@ createFile (pzFile) } tSuccess -testTest (pTest) +testTest (pTest, pzFile) tTestDesc *pTest; + char* pzFile; { char *pzRes; tSuccess res = FAILURE; static char zCmdBuf[4096]; - tSCC zCmdFmt[] = "if ( test %s ) > /dev/null 2>&1\n" + tSCC zCmdFmt[] = "f=%s\nif ( test %s ) > /dev/null 2>&1\n" "then echo TRUE\n" "else echo FALSE\n" "fi"; - sprintf (zCmdBuf, zCmdFmt, pTest->pzTest); + sprintf (zCmdBuf, zCmdFmt, pzFile, pTest->pzTest); pzRes = runShell (zCmdBuf); if (*pzRes == 'T') res = SUCCESS; @@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile) * IF *any* of the shell tests fail, * THEN do not process the fix. */ - if (!SUCCESSFUL (testTest (pTD))) + if (!SUCCESSFUL (testTest (pTD, pzFile))) goto nextFix; break; diff --git a/contrib/fixinc/fixincl.sh b/contrib/fixinc/fixincl.sh index 3acef0133d7..c231933d233 100755 --- a/contrib/fixinc/fixincl.sh +++ b/contrib/fixinc/fixincl.sh @@ -2,7 +2,7 @@ # # DO NOT EDIT THIS FILE (fixincl.sh) # -# It has been autogen-ed Thursday March 19, 1998 at 08:37:00 AM PST +# It has been autogen-ed Thursday May 28, 1998 at 08:21:16 AM PDT # From the definitions inclhack.def # and the template file inclhack.tpl # @@ -14,19 +14,19 @@ # # See README-fixinc for more information. # -# inclhack is free software. +# fixincludes is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either version 2, or (at your option) any later version. # -# inclhack is distributed in the hope that it will be useful, +# fixincludes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with inclhack. See the file "COPYING". If not, +# along with fixincludes. See the file "COPYING". If not, # write to: The Free Software Foundation, Inc., # 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. @@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then target_canonical="`config.guess`" ; fi test -z "${target_canonical}" && target_canonical=unknown fi +export target_canonical # # # # # # # # # # # # # # # # # # # # # # @@ -108,7 +109,7 @@ case $LIB in ;; esac -echo Building fixed headers in ${LIB} +echo Fixing headers into ${LIB} for ${target_canonical} target # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then diff --git a/contrib/fixinc/fixincl.x b/contrib/fixinc/fixincl.x index 29edba1bcea..c43e40a6e41 100644 --- a/contrib/fixinc/fixincl.x +++ b/contrib/fixinc/fixincl.x @@ -1,7 +1,7 @@ /* * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been autogen-ed Thursday March 19, 1998 at 08:34:20 AM PST + * It has been autogen-ed Thursday May 28, 1998 at 08:21:12 AM PDT * From the definitions inclhack.def * and the template file fixincl.tpl * @@ -56,7 +56,7 @@ tTestDesc aAix_SyswaitTests[] = { */ const char* apzAix_SyswaitPatch[] = { "sed", "-e" "/^extern pid_t wait3();$/i\\\n" - "struct rusage;", + "struct rusage;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -275,13 +275,13 @@ tSCC zAvoid_BoolList[] = */ const char* apzAvoid_BoolPatch[] = { "sed", "-e" "/^#[ \t]*define[ \t][ \t]*bool[ \t][ \t]*char[ \t]*$/i\\\n" - "#ifndef __cplusplus", + "#ifndef __cplusplus\n", "-e" "/^#[ \t]*define[ \t][ \t]*bool[ \t][ \t]*char[ \t]*$/a\\\n" - "#endif", + "#endif\n", "-e" "/^typedef[ \t][ \t]*char[ \t][ \t]*bool[ \t]*;/i\\\n" - "#ifndef __cplusplus", + "#ifndef __cplusplus\n", "-e" "/^typedef[ \t][ \t]*char[ \t][ \t]*bool[ \t]*;/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -314,11 +314,11 @@ const char* apzBad_Malloc_DeclPatch[] = { "sed", "#ifdef __cplusplus\\\n" "extern \"C\" {\\\n" "#endif\\\n" - "", + "\n", "-e" "$a\\\n" "#ifdef __cplusplus\\\n" "}\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -405,7 +405,7 @@ tTestDesc aBroken_Assert_StdioTests[] = { */ const char* apzBroken_Assert_StdioPatch[] = { "sed", "-e" "1i\\\n" - "#include ", + "#include \n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -444,7 +444,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed", "-e" "1i\\\n" "#ifdef __cplusplus\\\n" "#include \\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -766,11 +766,11 @@ const char* apzHpux_Cxx_UnreadyPatch[] = { "sed", "#ifdef __cplusplus\\\n" "extern \"C\" {\\\n" "#endif\\\n" - "", + "\n", "-e" "$a\\\n" "#ifdef __cplusplus\\\n" "}\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -792,9 +792,9 @@ tSCC zHpux_MaxintList[] = */ const char* apzHpux_MaxintPatch[] = { "sed", "-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n" - "#ifndef MAXINT", + "#ifndef MAXINT\n", "-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1082,7 +1082,7 @@ tTestDesc aIrix_SockaddrTests[] = { */ const char* apzIrix_SockaddrPatch[] = { "sed", "-e" "/authdes_create.*struct sockaddr/i\\\n" - "struct sockaddr;", + "struct sockaddr;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1104,7 +1104,7 @@ tSCC zIrix_Struct__FileList[] = */ const char* apzIrix_Struct__FilePatch[] = { "sed", "-e" "/xdrstdio_create.*struct __file_s/i\\\n" - "struct __file_s;", + "struct __file_s;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1239,29 +1239,29 @@ tTestDesc aLimits_IfndefsTests[] = { */ const char* apzLimits_IfndefsPatch[] = { "sed", "-e" "/[ \t]FLT_MIN[ \t]/i\\\n" - "#ifndef FLT_MIN", + "#ifndef FLT_MIN\n", "-e" "/[ \t]FLT_MIN[ \t]/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]FLT_MAX[ \t]/i\\\n" - "#ifndef FLT_MAX", + "#ifndef FLT_MAX\n", "-e" "/[ \t]FLT_MAX[ \t]/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]FLT_DIG[ \t]/i\\\n" - "#ifndef FLT_DIG", + "#ifndef FLT_DIG\n", "-e" "/[ \t]FLT_DIG[ \t]/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]DBL_MIN[ \t]/i\\\n" - "#ifndef DBL_MIN", + "#ifndef DBL_MIN\n", "-e" "/[ \t]DBL_MIN[ \t]/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]DBL_MAX[ \t]/i\\\n" - "#ifndef DBL_MAX", + "#ifndef DBL_MAX\n", "-e" "/[ \t]DBL_MAX[ \t]/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]DBL_DIG[ \t]/i\\\n" - "#ifndef DBL_DIG", + "#ifndef DBL_DIG\n", "-e" "/[ \t]DBL_DIG[ \t]/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1345,7 +1345,7 @@ const char* apzM88k_Bad_Hypot_OptPatch[] = { "sed", "{\\\n" "\treturn fabs (hypot (x, y));\\\n" "}\\\n" - "#define hypot\tfake_hypot", + "#define hypot\tfake_hypot\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1506,19 +1506,19 @@ const char* apzMath_ExceptionPatch[] = { "sed", "-e" "/struct exception/i\\\n" "#ifdef __cplusplus\\\n" "#define exception __math_exception\\\n" - "#endif", + "#endif\n", "-e" "/struct exception/a\\\n" "#ifdef __cplusplus\\\n" "#undef exception\\\n" - "#endif", + "#endif\n", "-e" "/matherr/i\\\n" "#ifdef __cplusplus\\\n" "#define exception __math_exception\\\n" - "#endif", + "#endif\n", "-e" "/matherr/a\\\n" "#ifdef __cplusplus\\\n" "#undef exception\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1599,7 +1599,7 @@ const char* apzMotorola_Stupid_OptPatch[] = { "sed", "{\\\n" "\treturn fabs (hypot (x, y));\\\n" "}\\\n" - "#define hypot\tfake_hypot", + "#define hypot\tfake_hypot\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1650,9 +1650,9 @@ tTestDesc aNews_Os_RecursionTests[] = { */ const char* apzNews_Os_RecursionPatch[] = { "sed", "-e" "/^#include /i\\\n" - "#ifdef BOGUS_RECURSION", + "#ifdef BOGUS_RECURSION\n", "-e" "/^#include /a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1794,8 +1794,15 @@ tSCC zNo_Double_SlashName[] = tSCC zNo_Double_SlashSelect0[] = "//[^*]"; -#define NO_DOUBLE_SLASH_TEST_CT 1 +/* + * content test pattern. A shell will deal with it later. + */ +tSCC zNo_Double_SlashTest0[] = + "-z \"`echo ${f}|grep ++`\""; + +#define NO_DOUBLE_SLASH_TEST_CT 2 tTestDesc aNo_Double_SlashTests[] = { + { TT_TEST, zNo_Double_SlashTest0, 0 /* unused */ }, { TT_EGREP, zNo_Double_SlashSelect0, (regex_t*)NULL } }; /* @@ -1887,7 +1894,7 @@ const char* apzOsf_Namespace_BPatch[] = { "sed", "-e" "/#include /a\\\n" "typedef __regex_t\tregex_t;\\\n" "typedef __regoff_t\tregoff_t;\\\n" - "typedef __regmatch_t\tregmatch_t;", + "typedef __regmatch_t\tregmatch_t;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -1946,9 +1953,9 @@ tTestDesc aRs6000_DoubleTests[] = { */ const char* apzRs6000_DoublePatch[] = { "sed", "-e" "/class[(]/i\\\n" - "#ifndef __cplusplus", + "#ifndef __cplusplus\n", "-e" "/class[(]/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2186,9 +2193,9 @@ const char* apzSun_CatmacroPatch[] = { "sed", "-e" "/^#define[ \t]CAT(a,b)/ i\\\n" "#ifdef __STDC__ \\\n" "#define CAT(a,b) a##b\\\n" - "#else", + "#else\n", "-e" "/^#define[ \t]CAT(a,b)/ a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2260,7 +2267,7 @@ const char* apzSun_MemcpyPatch[] = { "sed", "\\\n" "extern int memcmp();\\\n" "\\\n" - "#endif /* __memory_h__ */", + "#endif /* __memory_h__ */\n", "-e" "1,$d", (char*)NULL }; @@ -2323,9 +2330,9 @@ const char* apzSun_SignalPatch[] = { "sed", "-e" "/^void\t(\\*signal())();$/i\\\n" "#ifdef __cplusplus\\\n" "void\t(*signal(...))(...);\\\n" - "#else", + "#else\n", "-e" "/^void\t(\\*signal())();$/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2404,7 +2411,7 @@ tTestDesc aSunos_Matherr_DeclTests[] = { */ const char* apzSunos_Matherr_DeclPatch[] = { "sed", "-e" "/matherr/i\\\n" - "struct exception;", + "struct exception;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2469,20 +2476,20 @@ const char* apzSystypesPatch[] = { "sed", "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]size_t/i\\\n" "#ifndef __SIZE_TYPE__\\\n" "#define __SIZE_TYPE__ long unsigned int\\\n" - "#endif", + "#endif\n", "-e" "s/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]size_t/typedef __SIZE_TYPE__ size_t/", "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]ptrdiff_t/i\\\n" "#ifndef __PTRDIFF_TYPE__\\\n" "#define __PTRDIFF_TYPE__ long int\\\n" - "#endif", + "#endif\n", "-e" "s/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]ptrdiff_t/typedef __PTRDIFF_TYPE__ ptrdiff_t/", "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/i\\\n" "#ifndef __WCHAR_TYPE__\\\n" "#define __WCHAR_TYPE__ int\\\n" "#endif\\\n" - "#ifndef __cplusplus", + "#ifndef __cplusplus\n", "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/a\\\n" - "#endif", + "#endif\n", "-e" "s/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/typedef __WCHAR_TYPE__ wchar_t/", (char*)NULL }; @@ -2514,9 +2521,9 @@ tTestDesc aSystypes_For_AixTests[] = { const char* apzSystypes_For_AixPatch[] = { "sed", "-e" "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n" "#ifndef _GCC_SIZE_T\\\n" - "#define _GCC_SIZE_T", + "#define _GCC_SIZE_T\n", "-e" "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2576,9 +2583,9 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", "-e" "s/int[ \t][ \t]*exit/void\texit/g", "-e" "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/i\\\n" "#ifndef _GCC_SIZE_T\\\n" - "#define _GCC_SIZE_T", + "#define _GCC_SIZE_T\n", "-e" "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2601,19 +2608,19 @@ tSCC zSysz_Stdtypes_For_SunList[] = const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", "-e" "/[\t ]size_t.*;/i\\\n" "#ifndef _GCC_SIZE_T\\\n" - "#define _GCC_SIZE_T", + "#define _GCC_SIZE_T\n", "-e" "/[\t ]size_t.*;/a\\\n" - "#endif", + "#endif\n", "-e" "/[\t ]ptrdiff_t.*;/i\\\n" "#ifndef _GCC_PTRDIFF_T\\\n" - "#define _GCC_PTRDIFF_T", + "#define _GCC_PTRDIFF_T\n", "-e" "/[\t ]ptrdiff_t.*;/a\\\n" - "#endif", + "#endif\n", "-e" "/[\t ]wchar_t.*;/i\\\n" "#ifndef _GCC_WCHAR_T\\\n" - "#define _GCC_WCHAR_T", + "#define _GCC_WCHAR_T\n", "-e" "/[\t ]wchar_t.*;/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2664,7 +2671,7 @@ tTestDesc aUltrix_Ansi_CompatTests[] = { */ const char* apzUltrix_Ansi_CompatPatch[] = { "sed", "-e" "1i\\\n" - "/* This file intentionally left blank. */", + "/* This file intentionally left blank. */\n", "-e" "1,$d", (char*)NULL }; @@ -2836,7 +2843,7 @@ tTestDesc aUndefine_NullTests[] = { */ const char* apzUndefine_NullPatch[] = { "sed", "-e" "/^#[ \t]*define[ \t][ \t]*NULL[ \t]/i\\\n" - "#undef NULL", + "#undef NULL\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -2939,19 +2946,19 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", "-e" "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/", "-e" "/[ \t]size_t/i\\\n" "#ifndef _GCC_SIZE_T\\\n" - "#define _GCC_SIZE_T", + "#define _GCC_SIZE_T\n", "-e" "/[ \t]size_t/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]ptrdiff_t/i\\\n" "#ifndef _GCC_PTRDIFF_T\\\n" - "#define _GCC_PTRDIFF_T", + "#define _GCC_PTRDIFF_T\n", "-e" "/[ \t]ptrdiff_t/a\\\n" - "#endif", + "#endif\n", "-e" "/[ \t]wchar_t/i\\\n" "#ifndef _GCC_WCHAR_T\\\n" - "#define _GCC_WCHAR_T", + "#define _GCC_WCHAR_T\n", "-e" "/[ \t]wchar_t/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -3023,7 +3030,7 @@ tTestDesc aVxworks_Needs_VxworksTests[] = { */ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", "-e" "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n" - "#include ", + "#include \n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -3067,7 +3074,7 @@ const char* apzVxworks_TimePatch[] = { "sed", "typedef void (*__gcc_VOIDFUNCPTR) ();\\\n" "#endif\\\n" "#define __gcc_VOIDFUNCPTR_defined\\\n" - "#endif", + "#endif\n", "-e" "s/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g", (char*)NULL }; @@ -3100,9 +3107,9 @@ const char* apzX11_ClassPatch[] = { "sed", "-e" "/char [*]class;/i\\\n" "#ifdef __cplusplus\\\n" "\tchar *c_class;\\\n" - "#else", + "#else\n", "-e" "/char [*]class;/a\\\n" - "#endif", + "#endif\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * @@ -3163,9 +3170,9 @@ const char* apzX11_NewPatch[] = { "sed", "-e" "/Widget\told, new;/i\\\n" "#ifdef __cplusplus\\\n" "\tWidget\told, c_new;\\\n" - "#else", + "#else\n", "-e" "/Widget\told, new;/a\\\n" - "#endif", + "#endif\n", "-e" "s/Widget new,/Widget c_new,/g", (char*)NULL }; diff --git a/contrib/fixinc/inclhack.def b/contrib/fixinc/inclhack.def index 134f11ddbaf..77db04f9b88 100644 --- a/contrib/fixinc/inclhack.def +++ b/contrib/fixinc/inclhack.def @@ -1,4 +1,4 @@ -/* -*- Mode: C -*- $Id: inclhack.def,v 1.1 1998/03/20 16:19:41 korbb Exp $ */ +/* -*- Mode: C -*- $Id: inclhack.def,v 1.6 1998/09/22 07:22:00 korbb Exp $ */ autogen definitions inclhack; @@ -991,9 +991,12 @@ fix = { /* * Remove the double-slash comments * They *must* be removed so it will not create nested comments!! + * However, they will *not* be removed if '++' is in any part of + * their file name. */ fix = { hackname = no_double_slash; + test = '-z "`echo ${f}|grep ++`"'; select = '//[^*]'; sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|"; }; diff --git a/contrib/fixinc/inclhack.sh b/contrib/fixinc/inclhack.sh index adc1ee652e5..24583731f78 100755 --- a/contrib/fixinc/inclhack.sh +++ b/contrib/fixinc/inclhack.sh @@ -2,7 +2,7 @@ # # DO NOT EDIT THIS FILE (inclhack.sh) # -# It has been autogen-ed Thursday March 19, 1998 at 08:26:10 AM PST +# It has been autogen-ed Thursday May 28, 1998 at 08:21:14 AM PDT # From the definitions inclhack.def # and the template file inclhack.tpl # @@ -14,19 +14,19 @@ # # See README-fixinc for more information. # -# inclhack is free software. +# fixincludes is free software. # # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either version 2, or (at your option) any later version. # -# inclhack is distributed in the hope that it will be useful, +# fixincludes is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with inclhack. See the file "COPYING". If not, +# along with fixincludes. See the file "COPYING". If not, # write to: The Free Software Foundation, Inc., # 59 Temple Place - Suite 330, # Boston, MA 02111-1307, USA. @@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then target_canonical="`config.guess`" ; fi test -z "${target_canonical}" && target_canonical=unknown fi +export target_canonical # # # # # # # # # # # # # # # # # # # # # # @@ -106,7 +107,7 @@ case $LIB in ;; esac -echo Building fixed headers in ${LIB} +echo Fixing headers into ${LIB} for ${target_canonical} target # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then @@ -317,621 +318,619 @@ while [ $# != 0 ]; do for file in $files; do if ( test ! -r $file -o \ - -n "`fgrep 'This file is part of the GNU C Library' $file`" ) + -n "`fgrep 'This file is part of the GNU C Library' $file`" ) then continue ; fi fixlist="" - # Aix_Syswait fix + # + # Fix 1: Aix_Syswait # case "$file" in ./sys/wait.h ) - if ( test -n "`egrep 'bos325,' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - aix_syswait" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'bos325,' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + aix_syswait" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^extern pid_t wait3();$/i\ + sed -e '/^extern pid_t wait3();$/i\ struct rusage; -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Aix_Volatile fix + # + # Fix 2: Aix_Volatile # case "$file" in ./sys/signal.h ) - if ( test -n "`egrep 'typedef volatile int sig_atomic_t' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - aix_volatile" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'typedef volatile int sig_atomic_t' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + aix_volatile" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Alpha_Getopt fix + # + # Fix 3: Alpha_Getopt # case "$file" in ./stdio.h | \ ./stdlib.h ) - if ( test -n "`egrep 'getopt\\(int, char \\*\\[' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - alpha_getopt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'getopt\\(int, char \\*\\[' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + alpha_getopt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/getopt(int, char \*\[\],[ ]*char \*)/getopt(int, char *const[], const char *)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/getopt(int, char \*\[\],[ ]*char \*)/getopt(int, char *const[], const char *)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Alpha_Parens fix + # + # Fix 4: Alpha_Parens # case "$file" in ./sym.h ) - if ( test -n "`egrep '#ifndef\\(__mips64\\)' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - alpha_parens" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#ifndef\\(__mips64\\)' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + alpha_parens" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/#ifndef(__mips64)/#ifndef __mips64/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/#ifndef(__mips64)/#ifndef __mips64/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Alpha_Sbrk fix + # + # Fix 5: Alpha_Sbrk # case "$file" in ./unistd.h ) - if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - alpha_sbrk" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + alpha_sbrk" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Arm_Norcroft_Hint fix + # + # Fix 6: Arm_Norcroft_Hint # case "$file" in ./X11/Intrinsic.h ) - fixlist="${fixlist} - arm_norcroft_hint" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + arm_norcroft_hint" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/___type p_type/p_type/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/___type p_type/p_type/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Arm_Wchar fix + # + # Fix 7: Arm_Wchar # case "$file" in ./stdlib.h ) - if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - arm_wchar" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + arm_wchar" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ - -e 's/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ + -e 's/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Aux_Asm fix + # + # Fix 8: Aux_Asm # case "$file" in ./sys/param.h ) - if ( test -n "`egrep '#ifndef NOINLINE' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - aux_asm" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#ifndef NOINLINE' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + aux_asm" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Avoid_Bool fix + # + # Fix 9: Avoid_Bool # case "$file" in ./curses.h ) - fixlist="${fixlist} - avoid_bool" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + avoid_bool" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\ + sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\ #ifndef __cplusplus ' \ - -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\ + -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/a\ #endif ' \ - -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/i\ + -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/i\ #ifndef __cplusplus ' \ - -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\ + -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Bad_Malloc_Decl fix + # + # Fix 10: Bad_Malloc_Decl # case "$file" in ./rpc/types.h ) - if ( test -z "`egrep '\"C\"' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - bad_malloc_decl" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep '\"C\"' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + bad_malloc_decl" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ #ifdef __cplusplus\ extern "C" {\ #endif\ ' \ - -e '$a\ + -e '$a\ #ifdef __cplusplus\ }\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Bad_Struct_Term fix + # + # Fix 11: Bad_Struct_Term # case "$file" in ./curses.h ) - if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - bad_struct_term" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + bad_struct_term" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Badquote fix + # + # Fix 12: Badquote # case "$file" in ./sundev/vuid_event.h ) - fixlist="${fixlist} - badquote" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + badquote" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/doesn'\''t/does not/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/doesn'\''t/does not/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Broken_Assert_Stdio fix + # + # Fix 13: Broken_Assert_Stdio # case "$file" in ./assert.h ) - if ( test -n "`egrep 'stderr' $file`" -a \ - -z "`egrep 'include.*stdio.h' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - broken_assert_stdio" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'stderr' $file`" -a \ + -z "`egrep 'include.*stdio.h' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + broken_assert_stdio" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ #include -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Broken_Assert_Stdlib fix + # + # Fix 14: Broken_Assert_Stdlib # case "$file" in ./assert.h ) - if ( test -n "`egrep 'exit *\\(|abort *\\(' $file`" -a \ - -z "`egrep 'include.*stdlib.h' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - broken_assert_stdlib" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'exit *\\(|abort *\\(' $file`" -a \ + -z "`egrep 'include.*stdlib.h' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + broken_assert_stdlib" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ #ifdef __cplusplus\ #include \ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Bsd43_Io_Macros fix # - if ( test -n "`egrep 'BSD43__IO' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - bsd43_io_macros" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 15: Bsd43_Io_Macros + # + if ( test -n "`egrep 'BSD43__IO' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + bsd43_io_macros" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \ - -e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi + sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \ + -e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Cxx_Cmnt_Hpux fix + # + # Fix 16: Cxx_Cmnt_Hpux # case "$file" in ./sys/pci.h ) - if ( test -n "`egrep 'System Private Structures' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - cxx_cmnt_hpux" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'System Private Structures' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + cxx_cmnt_hpux" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's|//.*$||g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Cxx_Cmnt_Irix fix + # + # Fix 17: Cxx_Cmnt_Irix # case "$file" in ./fam.h ) - if ( test -n "`egrep 'indigo.esd' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - cxx_cmnt_irix" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'indigo.esd' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + cxx_cmnt_irix" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's|//.*$||g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Cxx_Cmnt_Sunos fix + # + # Fix 18: Cxx_Cmnt_Sunos # case "$file" in ./sbusdev/audiovar.h | \ ./sys/audiovar.h ) - fixlist="${fixlist} - cxx_cmnt_sunos" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + cxx_cmnt_sunos" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's|//.*$||g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Cxx_Cmnt_Vxworks fix + # + # Fix 19: Cxx_Cmnt_Vxworks # case "$file" in ./drv/netif/if_med.h ) - if ( test -n "`egrep 'Wind River' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - cxx_cmnt_vxworks" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'Wind River' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + cxx_cmnt_vxworks" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's|//.*$||g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Ecd_Cursor fix + # + # Fix 20: Ecd_Cursor # case "$file" in ./sunwindow/win_lock.h | \ ./sunwindow/win_cursor.h ) - fixlist="${fixlist} - ecd_cursor" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + ecd_cursor" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/ecd.cursor/ecd_cursor/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/ecd.cursor/ecd_cursor/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Else_Label fix # - if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - else_label" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 21: Else_Label + # + if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + else_label" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e ':loop + sed -e ':loop /\\$/N s/\\$/\\+++fixinc_eol+++/ /\\$/b loop s/\\+++fixinc_eol+++/\\/g s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1% -s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi +s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Endif_Label fix # - if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-~]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - endif_label" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 22: Endif_Label + # + if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-~]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + endif_label" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e ':loop + sed -e ':loop /\\$/N s/\\$/\\+++fixinc_eol+++/ /\\$/b loop s/\\+++fixinc_eol+++/\\/g s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1% s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1% -s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi +s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Hp_Inline fix + # + # Fix 23: Hp_Inline # case "$file" in ./sys/spinlock.h ) - if ( test -n "`egrep 'include.*\"\\.\\./machine/' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - hp_inline" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'include.*\"\\.\\./machine/' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + hp_inline" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's,"../machine/inline.h",,' \ - -e 's,"../machine/psl.h",,' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's,"../machine/inline.h",,' \ + -e 's,"../machine/psl.h",,' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Hp_Sysfile fix + # + # Fix 24: Hp_Sysfile # case "$file" in ./sys/file.h ) - if ( test -n "`egrep 'HPUX_SOURCE' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - hp_sysfile" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'HPUX_SOURCE' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + hp_sysfile" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/(\.\.\.)/(struct file * ...)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/(\.\.\.)/(struct file * ...)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Hpux_Cxx_Unready fix + # + # Fix 25: Hpux_Cxx_Unready # case "$file" in ./assert.h | \ ./sys/mman.h ) - if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - hpux_cxx_unready" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + hpux_cxx_unready" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ #ifdef __cplusplus\ extern "C" {\ #endif\ ' \ - -e '$a\ + -e '$a\ #ifdef __cplusplus\ }\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Hpux_Maxint fix + # + # Fix 26: Hpux_Maxint # case "$file" in ./sys/param.h ) - fixlist="${fixlist} - hpux_maxint" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + hpux_maxint" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^#[ ]*define[ ]*MAXINT[ ]/i\ + sed -e '/^#[ ]*define[ ]*MAXINT[ ]/i\ #ifndef MAXINT ' \ - -e '/^#[ ]*define[ ]*MAXINT[ ]/a\ + -e '/^#[ ]*define[ ]*MAXINT[ ]/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Hpux_Systime fix + # + # Fix 27: Hpux_Systime # case "$file" in ./sys/time.h ) - if ( test -n "`egrep '^extern struct sigevent;' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - hpux_systime" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^extern struct sigevent;' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + hpux_systime" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^extern struct sigevent;/struct sigevent;/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^extern struct sigevent;/struct sigevent;/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Interactv_Add1 fix + # + # Fix 28: Interactv_Add1 # case "$file" in ./stdio.h | \ ./math.h | \ @@ -939,257 +938,255 @@ extern "C" {\ ./sys/limits.h | \ ./sys/fcntl.h | \ ./sys/dirent.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - interactv_add1" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + interactv_add1" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Interactv_Add2 fix + # + # Fix 29: Interactv_Add2 # case "$file" in ./math.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - interactv_add2" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + interactv_add2" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/fmod(double)/fmod(double, double)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/fmod(double)/fmod(double, double)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Interactv_Add3 fix + # + # Fix 30: Interactv_Add3 # case "$file" in ./sys/limits.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - interactv_add3" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + interactv_add3" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/CHILD_MAX/s,/\* Max, Max,' \ - -e '/OPEN_MAX/s,/\* Max, Max,' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/CHILD_MAX/s,/\* Max, Max,' \ + -e '/OPEN_MAX/s,/\* Max, Max,' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Io_Def_Quotes fix # - if ( test -n "`egrep '[ ]_IO[A-Z]*[ ]*\\([A-Za-z]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - io_def_quotes" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi - - sed -e 's/\([ ]_IO[A-Z]*[ ]*(\)\([A-Za-z]\),/\1'\''\2'\'',/' \ - -e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \ - -e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi - - - # Ioctl_Fix_Ctrl fix + # Fix 31: Io_Def_Quotes # - if ( test -n "`egrep 'CTRL[ ]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - ioctl_fix_ctrl" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '[ ]_IO[A-Z]*[ ]*\\([A-Za-z]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + io_def_quotes" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ - -e '/[^A-Z0-9]_CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ - -e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \ - -e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ - -e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi + sed -e 's/\([ ]_IO[A-Z]*[ ]*(\)\([A-Za-z]\),/\1'\''\2'\'',/' \ + -e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \ + -e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Ip_Missing_Semi fix + # + # Fix 32: Ioctl_Fix_Ctrl + # + if ( test -n "`egrep 'CTRL[ ]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + ioctl_fix_ctrl" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi + + sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ + -e '/[^A-Z0-9]_CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ + -e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \ + -e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ + -e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + + + # + # Fix 33: Ip_Missing_Semi # case "$file" in ./netinet/ip.h ) - fixlist="${fixlist} - ip_missing_semi" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + ip_missing_semi" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^struct/,/^};/s/}$/};/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e '/^struct/,/^};/s/}$/};/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Irix_Bogus_Cxx_Cmnt fix + # + # Fix 34: Irix_Bogus_Cxx_Cmnt # case "$file" in ./elf_abi.h | \ ./elf.h ) - fixlist="${fixlist} - irix_bogus_cxx_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + irix_bogus_cxx_cmnt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@"/\*"\*/@"//"@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@"/\*"\*/@"//"@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Irix_Multiline_Cmnt fix + # + # Fix 35: Irix_Multiline_Cmnt # case "$file" in ./sys/types.h ) - fixlist="${fixlist} - irix_multiline_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + irix_multiline_cmnt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@type of the result@type of the result */@' \ - -e 's@of the sizeof@/* of the sizeof@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@type of the result@type of the result */@' \ + -e 's@of the sizeof@/* of the sizeof@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Irix_Sockaddr fix + # + # Fix 36: Irix_Sockaddr # case "$file" in ./rpc/auth.h ) - if ( test -n "`egrep 'authdes_create.*struct sockaddr' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - irix_sockaddr" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'authdes_create.*struct sockaddr' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + irix_sockaddr" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/authdes_create.*struct sockaddr/i\ + sed -e '/authdes_create.*struct sockaddr/i\ struct sockaddr; -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Irix_Struct__File fix + # + # Fix 37: Irix_Struct__File # case "$file" in ./rpc/xdr.h ) - fixlist="${fixlist} - irix_struct__file" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + irix_struct__file" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/xdrstdio_create.*struct __file_s/i\ + sed -e '/xdrstdio_create.*struct __file_s/i\ struct __file_s; -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Isc_Fmod fix + # + # Fix 38: Isc_Fmod # case "$file" in ./math.h ) - if ( test -n "`egrep 'fmod\\(double\\)' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - isc_fmod" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'fmod\\(double\\)' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + isc_fmod" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/fmod(double)/fmod(double, double)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/fmod(double)/fmod(double, double)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Isc_Sys_Limits fix + # + # Fix 39: Isc_Sys_Limits # case "$file" in ./sys/limits.h ) - if ( test -n "`egrep 'CHILD_MAX' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - isc_sys_limits" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'CHILD_MAX' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + isc_sys_limits" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/CHILD_MAX/s,/\* Max, Max,' \ - -e '/OPEN_MAX/s,/\* Max, Max,' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/CHILD_MAX/s,/\* Max, Max,' \ + -e '/OPEN_MAX/s,/\* Max, Max,' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Kandr_Concat fix + # + # Fix 40: Kandr_Concat # case "$file" in ./sparc/asm_linkage.h | \ ./sun3/asm_linkage.h | \ @@ -1209,132 +1206,131 @@ struct __file_s; ./sys/tty.h | \ ./Xm.acorn/XmP.h | \ ./bsd43/bsd43_.h ) - if ( test -n "`egrep '/\\*\\*/' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - kandr_concat" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '/\\*\\*/' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + kandr_concat" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's|/\*\*/| ## |g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's|/\*\*/| ## |g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Limits_Ifndefs fix + # + # Fix 41: Limits_Ifndefs # case "$file" in ./limits.h ) - if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - limits_ifndefs" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + limits_ifndefs" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/[ ]FLT_MIN[ ]/i\ + sed -e '/[ ]FLT_MIN[ ]/i\ #ifndef FLT_MIN ' \ - -e '/[ ]FLT_MIN[ ]/a\ + -e '/[ ]FLT_MIN[ ]/a\ #endif ' \ - -e '/[ ]FLT_MAX[ ]/i\ + -e '/[ ]FLT_MAX[ ]/i\ #ifndef FLT_MAX ' \ - -e '/[ ]FLT_MAX[ ]/a\ + -e '/[ ]FLT_MAX[ ]/a\ #endif ' \ - -e '/[ ]FLT_DIG[ ]/i\ + -e '/[ ]FLT_DIG[ ]/i\ #ifndef FLT_DIG ' \ - -e '/[ ]FLT_DIG[ ]/a\ + -e '/[ ]FLT_DIG[ ]/a\ #endif ' \ - -e '/[ ]DBL_MIN[ ]/i\ + -e '/[ ]DBL_MIN[ ]/i\ #ifndef DBL_MIN ' \ - -e '/[ ]DBL_MIN[ ]/a\ + -e '/[ ]DBL_MIN[ ]/a\ #endif ' \ - -e '/[ ]DBL_MAX[ ]/i\ + -e '/[ ]DBL_MAX[ ]/i\ #ifndef DBL_MAX ' \ - -e '/[ ]DBL_MAX[ ]/a\ + -e '/[ ]DBL_MAX[ ]/a\ #endif ' \ - -e '/[ ]DBL_DIG[ ]/i\ + -e '/[ ]DBL_DIG[ ]/i\ #ifndef DBL_DIG ' \ - -e '/[ ]DBL_DIG[ ]/a\ + -e '/[ ]DBL_DIG[ ]/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Lynx_Void_Int fix + # + # Fix 42: Lynx_Void_Int # case "$file" in ./curses.h ) - if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - lynx_void_int" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + lynx_void_int" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/#[ ]*define[ ][ ]*void[ ]int/d' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/#[ ]*define[ ][ ]*void[ ]int/d' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Lynxos_Fcntl_Proto fix + # + # Fix 43: Lynxos_Fcntl_Proto # case "$file" in ./fcntl.h ) - fixlist="${fixlist} - lynxos_fcntl_proto" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + lynxos_fcntl_proto" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # M88k_Bad_Hypot_Opt fix + # + # Fix 44: M88k_Bad_Hypot_Opt # case "$file" in ./math.h ) - fixlist="${fixlist} - m88k_bad_hypot_opt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + case "$target_canonical" in m88k-motorola-sysv3* ) + fixlist="${fixlist} + m88k_bad_hypot_opt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \ - -e '/^extern double hypot();$/a\ + sed -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \ + -e '/^extern double hypot();$/a\ \/* Workaround a stupid Motorola optimization if one\ of x or y is 0.0 and the other is negative! *\/\ #ifdef __STDC__\ @@ -1347,48 +1343,54 @@ static __inline__ double fake_hypot (x, y)\ return fabs (hypot (x, y));\ }\ #define hypot fake_hypot -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for machine type test + esac + ;; # case end for file name test esac - # M88k_Bad_S_If fix + # + # Fix 45: M88k_Bad_S_If # case "$file" in ./sys/stat.h ) - if ( test -n "`egrep '#define[ ]+S_IS[A-Z]*(m)[ ]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - m88k_bad_s_if" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + case "$target_canonical" in m88k-*-sysv3* ) + if ( test -n "`egrep '#define[ ]+S_IS[A-Z]*(m)[ ]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + m88k_bad_s_if" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(S_IF[A-Z][A-Z][A-Z][A-Z]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \ - -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(0[0-9]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(S_IF[A-Z][A-Z][A-Z][A-Z]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \ + -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(0[0-9]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for machine type test + esac + ;; # case end for file name test esac - # M88k_Multi_Incl fix + # + # Fix 46: M88k_Multi_Incl # case "$file" in ./time.h ) - if ( test -z "`egrep '#ifndef' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - m88k_multi_incl" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi - ( echo Fixing $file, to protect against multiple inclusion. >&2 + case "$target_canonical" in m88k-tektronix-sysv3* ) + if ( test -z "`egrep '#ifndef' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + m88k_multi_incl" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi + ( echo Fixing $file, to protect against multiple inclusion. >&2 cpp_wrapper=`echo $file | sed -e 's,\.,_,g' -e 's,/,_,g'` sed -e "1i\ #ifndef __GCC_GOT_${cpp_wrapper}_\ @@ -1396,32 +1398,34 @@ static __inline__ double fake_hypot (x, y)\ " \ -e "$a\ #endif /* ! __GCC_GOT_${cpp_wrapper}_ */ -" ) <&4 > ${DESTDIR}/$file. - exec 4<&- +" ) < $infile > ${DESTDIR}/$file. - # Shell scripts have the potential of removing the output - # - if test ! -f ${DESTDIR}/$file. - then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + # Shell scripts have the potential of removing the output + # We interpret that to mean the file is not to be altered + # + if test ! -f ${DESTDIR}/$file. + then continue ; fi + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for machine type test + esac + ;; # case end for file name test esac - # Machine_Name fix # - if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - machine_name" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 47: Machine_Name + # + if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + machine_name" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e ':loop + sed -e ':loop /\\$/N s/\\$/\\+++fixinc_eol+++/ /\\$/b loop @@ -1455,64 +1459,63 @@ s/\\+++fixinc_eol+++/\\/g s/ unix / __unix__ /g s/ vax / __vax__ /g s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g - }' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi + }' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Math_Exception fix + # + # Fix 48: Math_Exception # case "$file" in ./math.h ) - if ( test -n "`egrep 'struct exception' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - math_exception" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'struct exception' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + math_exception" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/struct exception/i\ + sed -e '/struct exception/i\ #ifdef __cplusplus\ #define exception __math_exception\ #endif ' \ - -e '/struct exception/a\ + -e '/struct exception/a\ #ifdef __cplusplus\ #undef exception\ #endif ' \ - -e '/matherr/i\ + -e '/matherr/i\ #ifdef __cplusplus\ #define exception __math_exception\ #endif ' \ - -e '/matherr/a\ + -e '/matherr/a\ #ifdef __cplusplus\ #undef exception\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Math_Gcc_Ifndefs fix + # + # Fix 49: Math_Gcc_Ifndefs # case "$file" in ./math.h ) - fixlist="${fixlist} - math_gcc_ifndefs" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi - ( dbl_max_def="`egrep 'define[ ]+DBL_MAX[ ]+.*' ${SRCDIR}/float.h 2>/dev/null`" + fixlist="${fixlist} + math_gcc_ifndefs" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi + ( dbl_max_def="`egrep 'define[ ]+DBL_MAX[ ]+.*' ${SRCDIR}/float.h 2>/dev/null`" if ( test -n "${dbl_max_def}" \ -a -n "`egrep '#define[ ]*HUGE_VAL[ ]+DBL_MAX' $file`" \ @@ -1531,32 +1534,33 @@ s/\\+++fixinc_eol+++/\\/g -e '/define[ ]HUGE_VAL[ ]/a\ #endif ' - fi ) <&4 > ${DESTDIR}/$file. - exec 4<&- + fi ) < $infile > ${DESTDIR}/$file. - # Shell scripts have the potential of removing the output - # - if test ! -f ${DESTDIR}/$file. - then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + # Shell scripts have the potential of removing the output + # We interpret that to mean the file is not to be altered + # + if test ! -f ${DESTDIR}/$file. + then continue ; fi + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Motorola_Stupid_Opt fix + # + # Fix 50: Motorola_Stupid_Opt # case "$file" in ./math.h ) - if ( test -n "`egrep '^extern double hypot();$' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - motorola_stupid_opt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + case "$target_canonical" in m88k-motorola-sysv3* ) + if ( test -n "`egrep '^extern double hypot();$' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + motorola_stupid_opt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^extern double hypot();$/a\ + sed -e '/^extern double hypot();$/a\ \/* Workaround a stupid Motorola optimization if one\ of x or y is 0.0 and the other is negative! *\/\ #ifdef __STDC__\ @@ -1569,374 +1573,376 @@ static __inline__ double fake_hypot (x, y)\ return fabs (hypot (x, y));\ }\ #define hypot fake_hypot -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for machine type test + esac + ;; # case end for file name test esac - # Nested_Comment fix + # + # Fix 51: Nested_Comment # case "$file" in ./rpc/rpc.h ) - fixlist="${fixlist} - nested_comment" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + nested_comment" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # News_Os_Recursion fix + # + # Fix 52: News_Os_Recursion # case "$file" in ./stdlib.h ) - if ( test -n "`egrep '#include ' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - news_os_recursion" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#include ' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + news_os_recursion" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^#include /i\ + sed -e '/^#include /i\ #ifdef BOGUS_RECURSION ' \ - -e '/^#include /a\ + -e '/^#include /a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Next_Math_Prefix fix + # + # Fix 53: Next_Math_Prefix # case "$file" in ./ansi/math.h ) - if ( test -n "`egrep '^extern.*double.*__const__.*' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - next_math_prefix" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^extern.*double.*__const__.*' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + next_math_prefix" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^extern.*double.*__const__.*sqrt(/s/__const__//' \ - -e '/^extern.*double.*__const__.*fabs(/s/__const__//' \ - -e '/^extern.*double.*__const__.*cos(/s/__const__//' \ - -e '/^extern.*double.*__const__.*hypot(/s/__const__//' \ - -e '/^extern.*double.*__const__.*sin(/s/__const__//' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/^extern.*double.*__const__.*sqrt(/s/__const__//' \ + -e '/^extern.*double.*__const__.*fabs(/s/__const__//' \ + -e '/^extern.*double.*__const__.*cos(/s/__const__//' \ + -e '/^extern.*double.*__const__.*hypot(/s/__const__//' \ + -e '/^extern.*double.*__const__.*sin(/s/__const__//' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Next_Template fix + # + # Fix 54: Next_Template # case "$file" in ./bsd/libc.h ) - if ( test -n "`egrep 'template' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - next_template" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'template' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + next_template" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/\(.*template\)/s/template//' \ - -e '/extern.*volatile.*void.*abort/s/volatile//' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/\(.*template\)/s/template//' \ + -e '/extern.*volatile.*void.*abort/s/volatile//' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Next_Volitile fix + # + # Fix 55: Next_Volitile # case "$file" in ./ansi/stdlib.h ) - if ( test -n "`egrep 'volatile' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - next_volitile" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'volatile' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + next_volitile" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/extern.*volatile.*void.*exit/s/volatile//' \ - -e '/extern.*volatile.*void.*abort/s/volatile//' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/extern.*volatile.*void.*exit/s/volatile//' \ + -e '/extern.*volatile.*void.*abort/s/volatile//' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Next_Wait_Union fix + # + # Fix 56: Next_Wait_Union # case "$file" in ./sys/wait.h ) - if ( test -n "`egrep 'wait\\(union wait' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - next_wait_union" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'wait\\(union wait' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + next_wait_union" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@wait(union wait@wait(void@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's@wait(union wait@wait(void@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # No_Double_Slash fix # - if ( test -n "`egrep '//[^*]' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - no_double_slash" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 57: No_Double_Slash + # + if ( test -n "`egrep '//[^*]' $file`" -a \ + '(' -z "`echo ${f}|grep ++`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + no_double_slash" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/\/\/[^*]/s|//\(.*\)$|/* \1 */|' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi + sed -e '/\/\/[^*]/s|//\(.*\)$|/* \1 */|' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Nodeent_Syntax fix + # + # Fix 58: Nodeent_Syntax # case "$file" in ./netdnet/dnetdb.h ) - fixlist="${fixlist} - nodeent_syntax" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + nodeent_syntax" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/char.*na_addr *$/char *na_addr;/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/char.*na_addr *$/char *na_addr;/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Osf_Namespace_A fix + # + # Fix 59: Osf_Namespace_A # case "$file" in ./reg_types.h | \ ./sys/lc_core.h ) - if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - osf_namespace_a" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + osf_namespace_a" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/regex_t/__regex_t/g' \ - -e 's/regoff_t/__regoff_t/g' \ - -e 's/regmatch_t/__regmatch_t/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/regex_t/__regex_t/g' \ + -e 's/regoff_t/__regoff_t/g' \ + -e 's/regmatch_t/__regmatch_t/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Osf_Namespace_B fix + # + # Fix 60: Osf_Namespace_B # case "$file" in ./regex.h ) - if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - osf_namespace_b" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + osf_namespace_b" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/#include /a\ + sed -e '/#include /a\ typedef __regex_t regex_t;\ typedef __regoff_t regoff_t;\ typedef __regmatch_t regmatch_t; -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Pthread_Page_Size fix + # + # Fix 61: Pthread_Page_Size # case "$file" in ./pthread.h ) - if ( test -n "`egrep '^int __page_size' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - pthread_page_size" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^int __page_size' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + pthread_page_size" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^int __page_size/extern int __page_size/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^int __page_size/extern int __page_size/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Rs6000_Double fix + # + # Fix 62: Rs6000_Double # case "$file" in ./math.h ) - if ( test -n "`egrep '[^a-zA-Z_]class\\(' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - rs6000_double" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '[^a-zA-Z_]class\\(' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + rs6000_double" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/class[(]/i\ + sed -e '/class[(]/i\ #ifndef __cplusplus ' \ - -e '/class[(]/a\ + -e '/class[(]/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Rs6000_Fchmod fix + # + # Fix 63: Rs6000_Fchmod # case "$file" in ./sys/stat.h ) - if ( test -n "`egrep 'fchmod\\(char' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - rs6000_fchmod" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'fchmod\\(char' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + rs6000_fchmod" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/fchmod(char \*/fchmod(int/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/fchmod(char \*/fchmod(int/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Rs6000_Param fix + # + # Fix 64: Rs6000_Param # case "$file" in ./stdio.h | \ ./unistd.h ) - fixlist="${fixlist} - rs6000_param" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + rs6000_param" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sony_Include fix + # + # Fix 65: Sony_Include # case "$file" in ./machine/machparam.h ) - if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sony_include" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sony_include" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@"../machine/endian.h"@@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's@"../machine/endian.h"@@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Statsswtch fix + # + # Fix 66: Statsswtch # case "$file" in ./rpcsvc/rstat.h ) - if ( test -n "`egrep 'boottime$' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - statsswtch" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'boottime$' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + statsswtch" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/boottime$/boottime;/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/boottime$/boottime;/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Stdio_Va_List fix + # + # Fix 67: Stdio_Va_List # case "$file" in ./stdio.h ) - fixlist="${fixlist} - stdio_va_list" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi - ( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + stdio_va_list" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi + ( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then : else echo "#define __need___va_list" @@ -1953,124 +1959,124 @@ typedef __regmatch_t regmatch_t; -e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \ -e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \ -e 's@VA_LIST@DUMMY_VA_LIST@' \ - -e 's@_Va_LIST@_VA_LIST@' ) <&4 > ${DESTDIR}/$file. - exec 4<&- + -e 's@_Va_LIST@_VA_LIST@' ) < $infile > ${DESTDIR}/$file. - # Shell scripts have the potential of removing the output - # - if test ! -f ${DESTDIR}/$file. - then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + # Shell scripts have the potential of removing the output + # We interpret that to mean the file is not to be altered + # + if test ! -f ${DESTDIR}/$file. + then continue ; fi + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sun_Bogus_Ifdef fix + # + # Fix 68: Sun_Bogus_Ifdef # case "$file" in ./hsfs/hsfs_spec.h | \ ./hsfs/iso_spec.h ) - if ( test -n "`egrep '#ifdef __i386__ || __vax__' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_bogus_ifdef" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#ifdef __i386__ || __vax__' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_bogus_ifdef" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Bogus_Ifdef_Sun4c fix + # + # Fix 69: Sun_Bogus_Ifdef_Sun4c # case "$file" in ./hsfs/hsnode.h ) - if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_bogus_ifdef_sun4c" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_bogus_ifdef_sun4c" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Catmacro fix + # + # Fix 70: Sun_Catmacro # case "$file" in ./pixrect/memvar.h ) - if ( test -n "`egrep '^#define[ ]+CAT(a,b)' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_catmacro" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^#define[ ]+CAT(a,b)' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_catmacro" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^#define[ ]CAT(a,b)/ i\ + sed -e '/^#define[ ]CAT(a,b)/ i\ #ifdef __STDC__ \ #define CAT(a,b) a##b\ #else ' \ - -e '/^#define[ ]CAT(a,b)/ a\ + -e '/^#define[ ]CAT(a,b)/ a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Malloc fix + # + # Fix 71: Sun_Malloc # case "$file" in ./malloc.h ) - fixlist="${fixlist} - sun_malloc" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + sun_malloc" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ - -e 's/int[ ][ ]*free/void free/g' \ - -e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \ - -e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ + -e 's/int[ ][ ]*free/void free/g' \ + -e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \ + -e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sun_Memcpy fix + # + # Fix 72: 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`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_memcpy" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_memcpy" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ /* This file was generated by fixincludes */\ #ifndef __memory_h__\ #define __memory_h__\ @@ -2091,153 +2097,155 @@ extern int memcmp();\ \ #endif /* __memory_h__ */ ' \ - -e '1,$d' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + -e '1,$d' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Rusers_Semi fix + # + # Fix 73: Sun_Rusers_Semi # case "$file" in ./rpcsvc/rusers.h ) - if ( test -n "`egrep '_cnt$' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_rusers_semi" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '_cnt$' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_rusers_semi" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Signal fix + # + # Fix 74: Sun_Signal # case "$file" in ./sys/signal.h | \ ./signal.h ) - if ( test -n "`egrep '^void \\(\\*signal\\(\\)\\)\\(\\);' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sun_signal" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '^void \\(\\*signal\\(\\)\\)\\(\\);' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sun_signal" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^void (\*signal())();$/i\ + sed -e '/^void (\*signal())();$/i\ #ifdef __cplusplus\ void (*signal(...))(...);\ #else ' \ - -e '/^void (\*signal())();$/a\ + -e '/^void (\*signal())();$/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sun_Xdr_Proto fix + # + # Fix 75: Sun_Xdr_Proto # case "$file" in ./rpc/xdr.h ) - fixlist="${fixlist} - sun_xdr_proto" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + sun_xdr_proto" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^\(.*\)\*\(x_.*\)();\(.*\)/\ + sed -e 's/^\(.*\)\*\(x_.*\)();\(.*\)/\ #ifdef __cplusplus\ \1*\2(...);\3\ #else\ \1*\2();\3\ -#endif/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +#endif/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sunos_Large_Macro fix + # + # Fix 76: Sunos_Large_Macro # case "$file" in ./sundev/ipi_error.h ) - fixlist="${fixlist} - sunos_large_macro" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi - ( echo "Removing incorrect fix to SunOS " >&2 + fixlist="${fixlist} + sunos_large_macro" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi + ( echo "Removing incorrect fix to SunOS " >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) <&4 > ${DESTDIR}/$file. - exec 4<&- +cat > /dev/null ) < $infile > ${DESTDIR}/$file. - # Shell scripts have the potential of removing the output - # - if test ! -f ${DESTDIR}/$file. - then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + # Shell scripts have the potential of removing the output + # We interpret that to mean the file is not to be altered + # + if test ! -f ${DESTDIR}/$file. + then continue ; fi + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sunos_Matherr_Decl fix + # + # Fix 77: Sunos_Matherr_Decl # case "$file" in ./math.h ) - if ( test '(' "`fgrep 'struct exception' $file | line`" != 'struct exception {' ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - sunos_matherr_decl" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test '(' "`fgrep 'struct exception' $file | line`" != 'struct exception {' ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + sunos_matherr_decl" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/matherr/i\ + sed -e '/matherr/i\ struct exception; -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sunos_Strlen fix + # + # Fix 78: Sunos_Strlen # case "$file" in ./strings.h ) - fixlist="${fixlist} - sunos_strlen" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + sunos_strlen" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Systypes fix + # + # Fix 79: Systypes # case "$file" in ./sys/types.h | \ ./stdlib.h | \ @@ -2245,374 +2253,377 @@ struct exception; ./stddef.h | \ ./memory.h | \ ./unistd.h ) - if ( test -n "`egrep 'typedef[ ]+[a-z_][ a-z_]*[ ](size|ptrdiff|wchar)_t' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - systypes" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'typedef[ ]+[a-z_][ a-z_]*[ ](size|ptrdiff|wchar)_t' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + systypes" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^[ ]**[ ]*typedef unsigned int size_t;/N' \ - -e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\ + sed -e '/^[ ]**[ ]*typedef unsigned int size_t;/N' \ + -e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\ #ifndef __SIZE_TYPE__\ #define __SIZE_TYPE__ long unsigned int\ #endif\ typedef __SIZE_TYPE__ size_t;\ /' \ - -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/i\ + -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/i\ #ifndef __SIZE_TYPE__\ #define __SIZE_TYPE__ long unsigned int\ #endif ' \ - -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/typedef __SIZE_TYPE__ size_t/' \ - -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]ptrdiff_t/i\ + -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]size_t/typedef __SIZE_TYPE__ size_t/' \ + -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]ptrdiff_t/i\ #ifndef __PTRDIFF_TYPE__\ #define __PTRDIFF_TYPE__ long int\ #endif ' \ - -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]ptrdiff_t/typedef __PTRDIFF_TYPE__ ptrdiff_t/' \ - -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/i\ + -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]ptrdiff_t/typedef __PTRDIFF_TYPE__ ptrdiff_t/' \ + -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/i\ #ifndef __WCHAR_TYPE__\ #define __WCHAR_TYPE__ int\ #endif\ #ifndef __cplusplus ' \ - -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/a\ + -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/a\ #endif ' \ - -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/typedef __WCHAR_TYPE__ wchar_t/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/typedef __WCHAR_TYPE__ wchar_t/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Systypes_For_Aix fix + # + # Fix 80: Systypes_For_Aix # case "$file" in ./sys/types.h ) - if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - systypes_for_aix" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + systypes_for_aix" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/i\ + sed -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/i\ #ifndef _GCC_SIZE_T\ #define _GCC_SIZE_T ' \ - -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/a\ + -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Sysv68_String fix + # + # Fix 81: Sysv68_String # case "$file" in ./string.h ) - fixlist="${fixlist} - sysv68_string" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + sysv68_string" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/extern[ ]*int[ ]*strlen();/extern unsigned int strlen();/' \ - -e 's/extern[ ]*int[ ]*ffs[ ]*(long);/extern int ffs(int);/' \ - -e 's/strdup(char \*s1);/strdup(const char *s1);/' \ - -e '/^extern char$/N' \ - -e 's/^extern char\(\n \*memccpy(),\)$/extern void\1/' \ - -e '/^ strncmp(),$/N' \ - -e 's/^\( strncmp()\),\n\( strlen(),\)$/\1;\ + sed -e 's/extern[ ]*int[ ]*strlen();/extern unsigned int strlen();/' \ + -e 's/extern[ ]*int[ ]*ffs[ ]*(long);/extern int ffs(int);/' \ + -e 's/strdup(char \*s1);/strdup(const char *s1);/' \ + -e '/^extern char$/N' \ + -e 's/^extern char\(\n \*memccpy(),\)$/extern void\1/' \ + -e '/^ strncmp(),$/N' \ + -e 's/^\( strncmp()\),\n\( strlen(),\)$/\1;\ extern unsigned int\ \2/' \ - -e '/^extern int$/N' \ - -e 's/^extern int\(\n strlen(),\)/extern size_t\1/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + -e '/^extern int$/N' \ + -e 's/^extern int\(\n strlen(),\)/extern size_t\1/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Sysz_Stdlib_For_Sun fix + # + # Fix 82: Sysz_Stdlib_For_Sun # case "$file" in ./stdlib.h ) - fixlist="${fixlist} - sysz_stdlib_for_sun" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + case "$target_canonical" in *-sun-* | \ + m88k-*-sysv3* ) + fixlist="${fixlist} + sysz_stdlib_for_sun" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/int abort/void abort/g' \ - -e 's/int free/void free/g' \ - -e 's/char[ ]*\*[ ]*calloc/void \* calloc/g' \ - -e 's/char[ ]*\*[ ]*malloc/void \* malloc/g' \ - -e 's/char[ ]*\*[ ]*realloc/void \* realloc/g' \ - -e 's/int[ ][ ]*exit/void exit/g' \ - -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/i\ + sed -e 's/int abort/void abort/g' \ + -e 's/int free/void free/g' \ + -e 's/char[ ]*\*[ ]*calloc/void \* calloc/g' \ + -e 's/char[ ]*\*[ ]*malloc/void \* malloc/g' \ + -e 's/char[ ]*\*[ ]*realloc/void \* realloc/g' \ + -e 's/int[ ][ ]*exit/void exit/g' \ + -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/i\ #ifndef _GCC_SIZE_T\ #define _GCC_SIZE_T ' \ - -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\ + -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for machine type test + esac + ;; # case end for file name test esac - # Sysz_Stdtypes_For_Sun fix + # + # Fix 83: Sysz_Stdtypes_For_Sun # case "$file" in ./sys/stdtypes.h ) - fixlist="${fixlist} - sysz_stdtypes_for_sun" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + sysz_stdtypes_for_sun" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/[ ]size_t.*;/i\ + sed -e '/[ ]size_t.*;/i\ #ifndef _GCC_SIZE_T\ #define _GCC_SIZE_T ' \ - -e '/[ ]size_t.*;/a\ + -e '/[ ]size_t.*;/a\ #endif ' \ - -e '/[ ]ptrdiff_t.*;/i\ + -e '/[ ]ptrdiff_t.*;/i\ #ifndef _GCC_PTRDIFF_T\ #define _GCC_PTRDIFF_T ' \ - -e '/[ ]ptrdiff_t.*;/a\ + -e '/[ ]ptrdiff_t.*;/a\ #endif ' \ - -e '/[ ]wchar_t.*;/i\ + -e '/[ ]wchar_t.*;/i\ #ifndef _GCC_WCHAR_T\ #define _GCC_WCHAR_T ' \ - -e '/[ ]wchar_t.*;/a\ + -e '/[ ]wchar_t.*;/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Tinfo_Cplusplus fix + # + # Fix 84: Tinfo_Cplusplus # case "$file" in ./tinfo.h ) - fixlist="${fixlist} - tinfo_cplusplus" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + tinfo_cplusplus" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/[ ]_cplusplus/ __cplusplus/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's/[ ]_cplusplus/ __cplusplus/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Ultrix_Ansi_Compat fix + # + # Fix 85: Ultrix_Ansi_Compat # case "$file" in ./ansi_compat.h ) - if ( test -n "`egrep 'ULTRIX' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - ultrix_ansi_compat" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'ULTRIX' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + ultrix_ansi_compat" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '1i\ + sed -e '1i\ /* This file intentionally left blank. */ ' \ - -e '1,$d' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + -e '1,$d' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Ultrix_Atof_Param fix + # + # Fix 86: Ultrix_Atof_Param # case "$file" in ./math.h ) - fixlist="${fixlist} - ultrix_atof_param" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + ultrix_atof_param" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ - -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \ - -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \ - -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \ - -e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ + -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \ + -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \ + -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \ + -e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Ultrix_Const fix + # + # Fix 87: Ultrix_Const # case "$file" in ./stdio.h ) - fixlist="${fixlist} - ultrix_const" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + ultrix_const" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ - -e 's@fputs( char \*__s,@fputs( const char *__s,@' \ - -e 's@fopen( char \*__filename, char \*__type );@fopen( const char *__filename, const char *__type );@' \ - -e 's@fwrite( void \*__ptr,@fwrite( const void *__ptr,@' \ - -e 's@fscanf( FILE \*__stream, char \*__format,@fscanf( FILE *__stream, const char *__format,@' \ - -e 's@scanf( char \*__format,@scanf( const char *__format,@' \ - -e 's@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \ - -e 's@popen(char \*, char \*);@popen(const char *, const char *);@' \ - -e 's@tempnam(char\*,char\*);@tempnam(const char*,const char*);@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ + -e 's@fputs( char \*__s,@fputs( const char *__s,@' \ + -e 's@fopen( char \*__filename, char \*__type );@fopen( const char *__filename, const char *__type );@' \ + -e 's@fwrite( void \*__ptr,@fwrite( const void *__ptr,@' \ + -e 's@fscanf( FILE \*__stream, char \*__format,@fscanf( FILE *__stream, const char *__format,@' \ + -e 's@scanf( char \*__format,@scanf( const char *__format,@' \ + -e 's@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \ + -e 's@popen(char \*, char \*);@popen(const char *, const char *);@' \ + -e 's@tempnam(char\*,char\*);@tempnam(const char*,const char*);@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Ultrix_Ifdef fix + # + # Fix 88: Ultrix_Ifdef # case "$file" in ./sys/file.h ) - if ( test -n "`egrep '#ifdef KERNEL' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - ultrix_ifdef" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#ifdef KERNEL' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + ultrix_ifdef" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Ultrix_Nested_Cmnt fix + # + # Fix 89: Ultrix_Nested_Cmnt # case "$file" in ./rpc/svc.h ) - fixlist="${fixlist} - ultrix_nested_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + ultrix_nested_cmnt" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's@^\( \* int protocol; \)/\*@\1*/ /*@' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; + sed -e 's@^\( \* int protocol; \)/\*@\1*/ /*@' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # Ultrix_Static fix + # + # Fix 90: Ultrix_Static # case "$file" in ./machine/cpu.h ) - if ( test -n "`egrep '#include \"r[34]_cpu' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - ultrix_static" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#include \"r[34]_cpu' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + ultrix_static" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \ - -e 's/^#include "r3_cpu\.h"$/#include /' \ - -e 's/^#include "r4_cpu\.h"$/#include /' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \ + -e 's/^#include "r3_cpu\.h"$/#include /' \ + -e 's/^#include "r4_cpu\.h"$/#include /' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Undefine_Null fix # - if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \ - -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - undefine_null" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + # Fix 91: Undefine_Null + # + if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \ + -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + undefine_null" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/^#[ ]*define[ ][ ]*NULL[ ]/i\ + sed -e '/^#[ ]*define[ ][ ]*NULL[ ]/i\ #undef NULL -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' - # Va_I960_Macro fix + # + # Fix 92: Va_I960_Macro # case "$file" in ./arch/i960/archI960.h ) - if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - va_i960_macro" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + va_i960_macro" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/__vsiz/__vxvsiz/' \ - -e 's/__vali/__vxvali/' \ - -e 's/__vpad/__vxvpad/' \ - -e 's/__alignof__/__vxalignof__/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/__vsiz/__vxvsiz/' \ + -e 's/__vali/__vxvali/' \ + -e 's/__vpad/__vxvpad/' \ + -e 's/__alignof__/__vxalignof__/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Void_Null fix + # + # Fix 93: Void_Null # case "$file" in ./curses.h | \ ./dbm.h | \ @@ -2625,128 +2636,126 @@ extern unsigned int\ ./sys/dir.h | \ ./sys/param.h | \ ./sys/types.h ) - if ( test -n "`egrep '#[ ]*define[ ][ ]*NULL[ ].*void' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - void_null" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#[ ]*define[ ][ ]*NULL[ ].*void' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + void_null" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/^#[ ]*define[ ]*NULL[ ]*((void[ ]*\*)0)/#define NULL 0/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/^#[ ]*define[ ]*NULL[ ]*((void[ ]*\*)0)/#define NULL 0/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Vxworks_Gcc_Problem fix + # + # Fix 94: Vxworks_Gcc_Problem # case "$file" in ./types/vxTypesBase.h ) - if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - vxworks_gcc_problem" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + vxworks_gcc_problem" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \ - -e '/[ ]size_t/i\ + sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \ + -e '/[ ]size_t/i\ #ifndef _GCC_SIZE_T\ #define _GCC_SIZE_T ' \ - -e '/[ ]size_t/a\ + -e '/[ ]size_t/a\ #endif ' \ - -e '/[ ]ptrdiff_t/i\ + -e '/[ ]ptrdiff_t/i\ #ifndef _GCC_PTRDIFF_T\ #define _GCC_PTRDIFF_T ' \ - -e '/[ ]ptrdiff_t/a\ + -e '/[ ]ptrdiff_t/a\ #endif ' \ - -e '/[ ]wchar_t/i\ + -e '/[ ]wchar_t/i\ #ifndef _GCC_WCHAR_T\ #define _GCC_WCHAR_T ' \ - -e '/[ ]wchar_t/a\ + -e '/[ ]wchar_t/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Vxworks_Needs_Vxtypes fix + # + # Fix 95: Vxworks_Needs_Vxtypes # case "$file" in ./time.h ) - if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - vxworks_needs_vxtypes" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + vxworks_needs_vxtypes" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/uint_t/unsigned int/' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/uint_t/unsigned int/' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Vxworks_Needs_Vxworks fix + # + # Fix 96: Vxworks_Needs_Vxworks # case "$file" in ./sys/stat.h ) - if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \ - '(' -r types/vxTypesOld.h ')' -a \ - '(' -n "`fgrep '#include' $file`" ')' -a \ - '(' -n "`fgrep ULONG $file`" ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - vxworks_needs_vxworks" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \ + '(' -r types/vxTypesOld.h ')' -a \ + '(' -n "`fgrep '#include' $file`" ')' -a \ + '(' -n "`fgrep ULONG $file`" ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + vxworks_needs_vxworks" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/#[ ]define[ ][ ]*__INCstath/a\ + sed -e '/#[ ]define[ ][ ]*__INCstath/a\ #include -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # Vxworks_Time fix + # + # Fix 97: Vxworks_Time # case "$file" in ./time.h ) - if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \ - '(' -r vxWorks.h ')' - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - vxworks_time" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \ + '(' -r vxWorks.h ')' + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + vxworks_time" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/VOIDFUNCPTR/i\ + sed -e '/VOIDFUNCPTR/i\ #ifndef __gcc_VOIDFUNCPTR_defined\ #ifdef __cplusplus\ typedef void (*__gcc_VOIDFUNCPTR) (...);\ @@ -2756,111 +2765,111 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ #define __gcc_VOIDFUNCPTR_defined\ #endif ' \ - -e 's/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + -e 's/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # X11_Class fix + # + # Fix 98: X11_Class # case "$file" in ./X11/ShellP.h ) - if ( test -z "`egrep '__cplusplus' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - x11_class" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep '__cplusplus' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + x11_class" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/char [*]class;/i\ + sed -e '/char [*]class;/i\ #ifdef __cplusplus\ char *c_class;\ #else ' \ - -e '/char [*]class;/a\ + -e '/char [*]class;/a\ #endif -' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; +' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # X11_Class_Usage fix + # + # Fix 99: X11_Class_Usage # case "$file" in ./Xm/BaseClassI.h ) - if ( test -z "`egrep '__cplusplus' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - x11_class_usage" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep '__cplusplus' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + x11_class_usage" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's/ class[)]/ c_class)/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + sed -e 's/ class[)]/ c_class)/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # X11_New fix + # + # Fix 100: X11_New # case "$file" in ./Xm/Traversal.h ) - if ( test -z "`egrep '__cplusplus' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - x11_new" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + if ( test -z "`egrep '__cplusplus' $file`" + ) > /dev/null 2>&1 ; then + fixlist="${fixlist} + x11_new" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e '/Widget old, new;/i\ + sed -e '/Widget old, new;/i\ #ifdef __cplusplus\ Widget old, c_new;\ #else ' \ - -e '/Widget old, new;/a\ + -e '/Widget old, new;/a\ #endif ' \ - -e 's/Widget new,/Widget c_new,/g' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi ;; + -e 's/Widget new,/Widget c_new,/g' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + fi # end of selection 'if' + ;; # case end for file name test esac - # X11_Sprintf fix + # + # Fix 101: X11_Sprintf # case "$file" in ./X11*/Xmu.h ) - fixlist="${fixlist} - x11_sprintf" - if [ ! -r ${DESTDIR}/$file ] - then exec 4< $file - else exec 4< ${DESTDIR}/$file ; fi - if test $? -ne 0 - then continue ; fi + fixlist="${fixlist} + x11_sprintf" + if [ ! -r ${DESTDIR}/$file ] + then infile=$file + else infile=${DESTDIR}/$file ; fi - sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ + sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ extern char * sprintf();\ -#endif /* !defined __STDC__ */,' <&4 > ${DESTDIR}/$file. - exec 4<&- - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; +#endif /* !defined __STDC__ */,' \ + < $infile > ${DESTDIR}/$file. + + mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + ;; # case end for file name test esac - # IF the output has been removed OR it is unchanged, # THEN ensure the output is gone # ELSE look for local directory include syntax @@ -2875,11 +2884,11 @@ extern char * sprintf();\ # Find any include directives that use "file". # for include in ` - egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${DESTDIR}/$file | - sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'` + egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${DESTDIR}/$file | + sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'` do - dir=`echo $file | sed -e s'|/[^/]*$||'` - required="$required ${SRCDIR} $dir/$include ${DESTDIR}/$dir/$include" + dir=`echo $file | sed -e s'|/[^/]*$||'` + required="$required ${SRCDIR} $dir/$include ${DESTDIR}/$dir/$include" done fi done # for file in $files