Commit c16b55aa by Bruce Korb

Added exclusion of C++ files for double slash fix

From-SVN: r20117
parent 8a5b8e20
/* /*
* $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 * Install modified versions of certain ANSI-incompatible system header
* files which are fixed to work correctly with ANSI C and placed in a * files which are fixed to work correctly with ANSI C and placed in a
...@@ -28,7 +28,6 @@ ...@@ -28,7 +28,6 @@
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stropts.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <signal.h> #include <signal.h>
#include <stdio.h> #include <stdio.h>
...@@ -36,8 +35,6 @@ ...@@ -36,8 +35,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <errno.h> #include <errno.h>
#include <string.h> #include <string.h>
#include <stropts.h>
#include <poll.h>
#include <fcntl.h> #include <fcntl.h>
#include <ctype.h> #include <ctype.h>
...@@ -138,7 +135,7 @@ main (argc, argv) ...@@ -138,7 +135,7 @@ main (argc, argv)
if (strcmp (argv[1], "-v") == 0) 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); exit (EXIT_SUCCESS);
} }
...@@ -448,17 +445,18 @@ createFile (pzFile) ...@@ -448,17 +445,18 @@ createFile (pzFile)
} }
tSuccess tSuccess
testTest (pTest) testTest (pTest, pzFile)
tTestDesc *pTest; tTestDesc *pTest;
char* pzFile;
{ {
char *pzRes; char *pzRes;
tSuccess res = FAILURE; tSuccess res = FAILURE;
static char zCmdBuf[4096]; 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"; "then echo TRUE\n" "else echo FALSE\n" "fi";
sprintf (zCmdBuf, zCmdFmt, pTest->pzTest); sprintf (zCmdBuf, zCmdFmt, pzFile, pTest->pzTest);
pzRes = runShell (zCmdBuf); pzRes = runShell (zCmdBuf);
if (*pzRes == 'T') if (*pzRes == 'T')
res = SUCCESS; res = SUCCESS;
...@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile) ...@@ -643,7 +641,7 @@ process (pzDta, pzDir, pzFile)
* IF *any* of the shell tests fail, * IF *any* of the shell tests fail,
* THEN do not process the fix. * THEN do not process the fix.
*/ */
if (!SUCCESSFUL (testTest (pTD))) if (!SUCCESSFUL (testTest (pTD, pzFile)))
goto nextFix; goto nextFix;
break; break;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# DO NOT EDIT THIS FILE (fixincl.sh) # 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 # From the definitions inclhack.def
# and the template file inclhack.tpl # and the template file inclhack.tpl
# #
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
# #
# See README-fixinc for more information. # 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 # You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software # GNU General Public License, as published by the Free Software
# Foundation; either version 2, or (at your option) any later version. # Foundation; either version 2, 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 # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. # See the GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # 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., # write to: The Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, # 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then ...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then
target_canonical="`config.guess`" ; fi target_canonical="`config.guess`" ; fi
test -z "${target_canonical}" && target_canonical=unknown test -z "${target_canonical}" && target_canonical=unknown
fi fi
export target_canonical
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
...@@ -108,7 +109,7 @@ case $LIB in ...@@ -108,7 +109,7 @@ case $LIB in
;; ;;
esac esac
echo Building fixed headers in ${LIB} echo Fixing headers into ${LIB} for ${target_canonical} target
# Determine whether this system has symbolic links. # Determine whether this system has symbolic links.
if ln -s X $LIB/ShouldNotExist 2>/dev/null; then if ln -s X $LIB/ShouldNotExist 2>/dev/null; then
......
/* /*
* DO NOT EDIT THIS FILE (fixincl.x) * 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 * From the definitions inclhack.def
* and the template file fixincl.tpl * and the template file fixincl.tpl
* *
...@@ -56,7 +56,7 @@ tTestDesc aAix_SyswaitTests[] = { ...@@ -56,7 +56,7 @@ tTestDesc aAix_SyswaitTests[] = {
*/ */
const char* apzAix_SyswaitPatch[] = { "sed", const char* apzAix_SyswaitPatch[] = { "sed",
"-e" "/^extern pid_t wait3();$/i\\\n" "-e" "/^extern pid_t wait3();$/i\\\n"
"struct rusage;", "struct rusage;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -275,13 +275,13 @@ tSCC zAvoid_BoolList[] = ...@@ -275,13 +275,13 @@ tSCC zAvoid_BoolList[] =
*/ */
const char* apzAvoid_BoolPatch[] = { "sed", const char* apzAvoid_BoolPatch[] = { "sed",
"-e" "/^#[ \t]*define[ \t][ \t]*bool[ \t][ \t]*char[ \t]*$/i\\\n" "-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" "-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" "-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" "-e" "/^typedef[ \t][ \t]*char[ \t][ \t]*bool[ \t]*;/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -314,11 +314,11 @@ const char* apzBad_Malloc_DeclPatch[] = { "sed", ...@@ -314,11 +314,11 @@ const char* apzBad_Malloc_DeclPatch[] = { "sed",
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"extern \"C\" {\\\n" "extern \"C\" {\\\n"
"#endif\\\n" "#endif\\\n"
"", "\n",
"-e" "$a\\\n" "-e" "$a\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"}\\\n" "}\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -405,7 +405,7 @@ tTestDesc aBroken_Assert_StdioTests[] = { ...@@ -405,7 +405,7 @@ tTestDesc aBroken_Assert_StdioTests[] = {
*/ */
const char* apzBroken_Assert_StdioPatch[] = { "sed", const char* apzBroken_Assert_StdioPatch[] = { "sed",
"-e" "1i\\\n" "-e" "1i\\\n"
"#include <stdio.h>", "#include <stdio.h>\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -444,7 +444,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed", ...@@ -444,7 +444,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed",
"-e" "1i\\\n" "-e" "1i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#include <stdlib.h>\\\n" "#include <stdlib.h>\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -766,11 +766,11 @@ const char* apzHpux_Cxx_UnreadyPatch[] = { "sed", ...@@ -766,11 +766,11 @@ const char* apzHpux_Cxx_UnreadyPatch[] = { "sed",
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"extern \"C\" {\\\n" "extern \"C\" {\\\n"
"#endif\\\n" "#endif\\\n"
"", "\n",
"-e" "$a\\\n" "-e" "$a\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"}\\\n" "}\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -792,9 +792,9 @@ tSCC zHpux_MaxintList[] = ...@@ -792,9 +792,9 @@ tSCC zHpux_MaxintList[] =
*/ */
const char* apzHpux_MaxintPatch[] = { "sed", const char* apzHpux_MaxintPatch[] = { "sed",
"-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n" "-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/i\\\n"
"#ifndef MAXINT", "#ifndef MAXINT\n",
"-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n" "-e" "/^#[ \t]*define[ \t]*MAXINT[ \t]/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1082,7 +1082,7 @@ tTestDesc aIrix_SockaddrTests[] = { ...@@ -1082,7 +1082,7 @@ tTestDesc aIrix_SockaddrTests[] = {
*/ */
const char* apzIrix_SockaddrPatch[] = { "sed", const char* apzIrix_SockaddrPatch[] = { "sed",
"-e" "/authdes_create.*struct sockaddr/i\\\n" "-e" "/authdes_create.*struct sockaddr/i\\\n"
"struct sockaddr;", "struct sockaddr;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1104,7 +1104,7 @@ tSCC zIrix_Struct__FileList[] = ...@@ -1104,7 +1104,7 @@ tSCC zIrix_Struct__FileList[] =
*/ */
const char* apzIrix_Struct__FilePatch[] = { "sed", const char* apzIrix_Struct__FilePatch[] = { "sed",
"-e" "/xdrstdio_create.*struct __file_s/i\\\n" "-e" "/xdrstdio_create.*struct __file_s/i\\\n"
"struct __file_s;", "struct __file_s;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1239,29 +1239,29 @@ tTestDesc aLimits_IfndefsTests[] = { ...@@ -1239,29 +1239,29 @@ tTestDesc aLimits_IfndefsTests[] = {
*/ */
const char* apzLimits_IfndefsPatch[] = { "sed", const char* apzLimits_IfndefsPatch[] = { "sed",
"-e" "/[ \t]FLT_MIN[ \t]/i\\\n" "-e" "/[ \t]FLT_MIN[ \t]/i\\\n"
"#ifndef FLT_MIN", "#ifndef FLT_MIN\n",
"-e" "/[ \t]FLT_MIN[ \t]/a\\\n" "-e" "/[ \t]FLT_MIN[ \t]/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]FLT_MAX[ \t]/i\\\n" "-e" "/[ \t]FLT_MAX[ \t]/i\\\n"
"#ifndef FLT_MAX", "#ifndef FLT_MAX\n",
"-e" "/[ \t]FLT_MAX[ \t]/a\\\n" "-e" "/[ \t]FLT_MAX[ \t]/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]FLT_DIG[ \t]/i\\\n" "-e" "/[ \t]FLT_DIG[ \t]/i\\\n"
"#ifndef FLT_DIG", "#ifndef FLT_DIG\n",
"-e" "/[ \t]FLT_DIG[ \t]/a\\\n" "-e" "/[ \t]FLT_DIG[ \t]/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]DBL_MIN[ \t]/i\\\n" "-e" "/[ \t]DBL_MIN[ \t]/i\\\n"
"#ifndef DBL_MIN", "#ifndef DBL_MIN\n",
"-e" "/[ \t]DBL_MIN[ \t]/a\\\n" "-e" "/[ \t]DBL_MIN[ \t]/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]DBL_MAX[ \t]/i\\\n" "-e" "/[ \t]DBL_MAX[ \t]/i\\\n"
"#ifndef DBL_MAX", "#ifndef DBL_MAX\n",
"-e" "/[ \t]DBL_MAX[ \t]/a\\\n" "-e" "/[ \t]DBL_MAX[ \t]/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]DBL_DIG[ \t]/i\\\n" "-e" "/[ \t]DBL_DIG[ \t]/i\\\n"
"#ifndef DBL_DIG", "#ifndef DBL_DIG\n",
"-e" "/[ \t]DBL_DIG[ \t]/a\\\n" "-e" "/[ \t]DBL_DIG[ \t]/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1345,7 +1345,7 @@ const char* apzM88k_Bad_Hypot_OptPatch[] = { "sed", ...@@ -1345,7 +1345,7 @@ const char* apzM88k_Bad_Hypot_OptPatch[] = { "sed",
"{\\\n" "{\\\n"
"\treturn fabs (hypot (x, y));\\\n" "\treturn fabs (hypot (x, y));\\\n"
"}\\\n" "}\\\n"
"#define hypot\tfake_hypot", "#define hypot\tfake_hypot\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1506,19 +1506,19 @@ const char* apzMath_ExceptionPatch[] = { "sed", ...@@ -1506,19 +1506,19 @@ const char* apzMath_ExceptionPatch[] = { "sed",
"-e" "/struct exception/i\\\n" "-e" "/struct exception/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n" "#define exception __math_exception\\\n"
"#endif", "#endif\n",
"-e" "/struct exception/a\\\n" "-e" "/struct exception/a\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#undef exception\\\n" "#undef exception\\\n"
"#endif", "#endif\n",
"-e" "/matherr/i\\\n" "-e" "/matherr/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#define exception __math_exception\\\n" "#define exception __math_exception\\\n"
"#endif", "#endif\n",
"-e" "/matherr/a\\\n" "-e" "/matherr/a\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"#undef exception\\\n" "#undef exception\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1599,7 +1599,7 @@ const char* apzMotorola_Stupid_OptPatch[] = { "sed", ...@@ -1599,7 +1599,7 @@ const char* apzMotorola_Stupid_OptPatch[] = { "sed",
"{\\\n" "{\\\n"
"\treturn fabs (hypot (x, y));\\\n" "\treturn fabs (hypot (x, y));\\\n"
"}\\\n" "}\\\n"
"#define hypot\tfake_hypot", "#define hypot\tfake_hypot\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1650,9 +1650,9 @@ tTestDesc aNews_Os_RecursionTests[] = { ...@@ -1650,9 +1650,9 @@ tTestDesc aNews_Os_RecursionTests[] = {
*/ */
const char* apzNews_Os_RecursionPatch[] = { "sed", const char* apzNews_Os_RecursionPatch[] = { "sed",
"-e" "/^#include <stdlib.h>/i\\\n" "-e" "/^#include <stdlib.h>/i\\\n"
"#ifdef BOGUS_RECURSION", "#ifdef BOGUS_RECURSION\n",
"-e" "/^#include <stdlib.h>/a\\\n" "-e" "/^#include <stdlib.h>/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1794,8 +1794,15 @@ tSCC zNo_Double_SlashName[] = ...@@ -1794,8 +1794,15 @@ tSCC zNo_Double_SlashName[] =
tSCC zNo_Double_SlashSelect0[] = 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[] = { tTestDesc aNo_Double_SlashTests[] = {
{ TT_TEST, zNo_Double_SlashTest0, 0 /* unused */ },
{ TT_EGREP, zNo_Double_SlashSelect0, (regex_t*)NULL } }; { TT_EGREP, zNo_Double_SlashSelect0, (regex_t*)NULL } };
/* /*
...@@ -1887,7 +1894,7 @@ const char* apzOsf_Namespace_BPatch[] = { "sed", ...@@ -1887,7 +1894,7 @@ const char* apzOsf_Namespace_BPatch[] = { "sed",
"-e" "/#include <reg_types.h>/a\\\n" "-e" "/#include <reg_types.h>/a\\\n"
"typedef __regex_t\tregex_t;\\\n" "typedef __regex_t\tregex_t;\\\n"
"typedef __regoff_t\tregoff_t;\\\n" "typedef __regoff_t\tregoff_t;\\\n"
"typedef __regmatch_t\tregmatch_t;", "typedef __regmatch_t\tregmatch_t;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -1946,9 +1953,9 @@ tTestDesc aRs6000_DoubleTests[] = { ...@@ -1946,9 +1953,9 @@ tTestDesc aRs6000_DoubleTests[] = {
*/ */
const char* apzRs6000_DoublePatch[] = { "sed", const char* apzRs6000_DoublePatch[] = { "sed",
"-e" "/class[(]/i\\\n" "-e" "/class[(]/i\\\n"
"#ifndef __cplusplus", "#ifndef __cplusplus\n",
"-e" "/class[(]/a\\\n" "-e" "/class[(]/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2186,9 +2193,9 @@ const char* apzSun_CatmacroPatch[] = { "sed", ...@@ -2186,9 +2193,9 @@ const char* apzSun_CatmacroPatch[] = { "sed",
"-e" "/^#define[ \t]CAT(a,b)/ i\\\n" "-e" "/^#define[ \t]CAT(a,b)/ i\\\n"
"#ifdef __STDC__ \\\n" "#ifdef __STDC__ \\\n"
"#define CAT(a,b) a##b\\\n" "#define CAT(a,b) a##b\\\n"
"#else", "#else\n",
"-e" "/^#define[ \t]CAT(a,b)/ a\\\n" "-e" "/^#define[ \t]CAT(a,b)/ a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2260,7 +2267,7 @@ const char* apzSun_MemcpyPatch[] = { "sed", ...@@ -2260,7 +2267,7 @@ const char* apzSun_MemcpyPatch[] = { "sed",
"\\\n" "\\\n"
"extern int memcmp();\\\n" "extern int memcmp();\\\n"
"\\\n" "\\\n"
"#endif /* __memory_h__ */", "#endif /* __memory_h__ */\n",
"-e" "1,$d", "-e" "1,$d",
(char*)NULL }; (char*)NULL };
...@@ -2323,9 +2330,9 @@ const char* apzSun_SignalPatch[] = { "sed", ...@@ -2323,9 +2330,9 @@ const char* apzSun_SignalPatch[] = { "sed",
"-e" "/^void\t(\\*signal())();$/i\\\n" "-e" "/^void\t(\\*signal())();$/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"void\t(*signal(...))(...);\\\n" "void\t(*signal(...))(...);\\\n"
"#else", "#else\n",
"-e" "/^void\t(\\*signal())();$/a\\\n" "-e" "/^void\t(\\*signal())();$/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2404,7 +2411,7 @@ tTestDesc aSunos_Matherr_DeclTests[] = { ...@@ -2404,7 +2411,7 @@ tTestDesc aSunos_Matherr_DeclTests[] = {
*/ */
const char* apzSunos_Matherr_DeclPatch[] = { "sed", const char* apzSunos_Matherr_DeclPatch[] = { "sed",
"-e" "/matherr/i\\\n" "-e" "/matherr/i\\\n"
"struct exception;", "struct exception;\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2469,20 +2476,20 @@ const char* apzSystypesPatch[] = { "sed", ...@@ -2469,20 +2476,20 @@ const char* apzSystypesPatch[] = { "sed",
"-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]size_t/i\\\n" "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]size_t/i\\\n"
"#ifndef __SIZE_TYPE__\\\n" "#ifndef __SIZE_TYPE__\\\n"
"#define __SIZE_TYPE__ long unsigned int\\\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" "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" "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]ptrdiff_t/i\\\n"
"#ifndef __PTRDIFF_TYPE__\\\n" "#ifndef __PTRDIFF_TYPE__\\\n"
"#define __PTRDIFF_TYPE__ long int\\\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" "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" "-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/i\\\n"
"#ifndef __WCHAR_TYPE__\\\n" "#ifndef __WCHAR_TYPE__\\\n"
"#define __WCHAR_TYPE__ int\\\n" "#define __WCHAR_TYPE__ int\\\n"
"#endif\\\n" "#endif\\\n"
"#ifndef __cplusplus", "#ifndef __cplusplus\n",
"-e" "/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/a\\\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/", "-e" "s/typedef[ \t][ \t]*[a-z_][ \ta-z_]*[ \t]wchar_t/typedef __WCHAR_TYPE__ wchar_t/",
(char*)NULL }; (char*)NULL };
...@@ -2514,9 +2521,9 @@ tTestDesc aSystypes_For_AixTests[] = { ...@@ -2514,9 +2521,9 @@ tTestDesc aSystypes_For_AixTests[] = {
const char* apzSystypes_For_AixPatch[] = { "sed", const char* apzSystypes_For_AixPatch[] = { "sed",
"-e" "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n" "-e" "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/i\\\n"
"#ifndef _GCC_SIZE_T\\\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" "-e" "/typedef[ \t][ \t]*[A-Za-z_][ \tA-Za-z_]*[ \t]size_t/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2576,9 +2583,9 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", ...@@ -2576,9 +2583,9 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed",
"-e" "s/int[ \t][ \t]*exit/void\texit/g", "-e" "s/int[ \t][ \t]*exit/void\texit/g",
"-e" "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/i\\\n" "-e" "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/i\\\n"
"#ifndef _GCC_SIZE_T\\\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" "-e" "/typedef[ \ta-zA-Z_]*[ \t]size_t[ \t]*;/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2601,19 +2608,19 @@ tSCC zSysz_Stdtypes_For_SunList[] = ...@@ -2601,19 +2608,19 @@ tSCC zSysz_Stdtypes_For_SunList[] =
const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed",
"-e" "/[\t ]size_t.*;/i\\\n" "-e" "/[\t ]size_t.*;/i\\\n"
"#ifndef _GCC_SIZE_T\\\n" "#ifndef _GCC_SIZE_T\\\n"
"#define _GCC_SIZE_T", "#define _GCC_SIZE_T\n",
"-e" "/[\t ]size_t.*;/a\\\n" "-e" "/[\t ]size_t.*;/a\\\n"
"#endif", "#endif\n",
"-e" "/[\t ]ptrdiff_t.*;/i\\\n" "-e" "/[\t ]ptrdiff_t.*;/i\\\n"
"#ifndef _GCC_PTRDIFF_T\\\n" "#ifndef _GCC_PTRDIFF_T\\\n"
"#define _GCC_PTRDIFF_T", "#define _GCC_PTRDIFF_T\n",
"-e" "/[\t ]ptrdiff_t.*;/a\\\n" "-e" "/[\t ]ptrdiff_t.*;/a\\\n"
"#endif", "#endif\n",
"-e" "/[\t ]wchar_t.*;/i\\\n" "-e" "/[\t ]wchar_t.*;/i\\\n"
"#ifndef _GCC_WCHAR_T\\\n" "#ifndef _GCC_WCHAR_T\\\n"
"#define _GCC_WCHAR_T", "#define _GCC_WCHAR_T\n",
"-e" "/[\t ]wchar_t.*;/a\\\n" "-e" "/[\t ]wchar_t.*;/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2664,7 +2671,7 @@ tTestDesc aUltrix_Ansi_CompatTests[] = { ...@@ -2664,7 +2671,7 @@ tTestDesc aUltrix_Ansi_CompatTests[] = {
*/ */
const char* apzUltrix_Ansi_CompatPatch[] = { "sed", const char* apzUltrix_Ansi_CompatPatch[] = { "sed",
"-e" "1i\\\n" "-e" "1i\\\n"
"/* This file intentionally left blank. */", "/* This file intentionally left blank. */\n",
"-e" "1,$d", "-e" "1,$d",
(char*)NULL }; (char*)NULL };
...@@ -2836,7 +2843,7 @@ tTestDesc aUndefine_NullTests[] = { ...@@ -2836,7 +2843,7 @@ tTestDesc aUndefine_NullTests[] = {
*/ */
const char* apzUndefine_NullPatch[] = { "sed", const char* apzUndefine_NullPatch[] = { "sed",
"-e" "/^#[ \t]*define[ \t][ \t]*NULL[ \t]/i\\\n" "-e" "/^#[ \t]*define[ \t][ \t]*NULL[ \t]/i\\\n"
"#undef NULL", "#undef NULL\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -2939,19 +2946,19 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", ...@@ -2939,19 +2946,19 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed",
"-e" "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/", "-e" "s/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/",
"-e" "/[ \t]size_t/i\\\n" "-e" "/[ \t]size_t/i\\\n"
"#ifndef _GCC_SIZE_T\\\n" "#ifndef _GCC_SIZE_T\\\n"
"#define _GCC_SIZE_T", "#define _GCC_SIZE_T\n",
"-e" "/[ \t]size_t/a\\\n" "-e" "/[ \t]size_t/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]ptrdiff_t/i\\\n" "-e" "/[ \t]ptrdiff_t/i\\\n"
"#ifndef _GCC_PTRDIFF_T\\\n" "#ifndef _GCC_PTRDIFF_T\\\n"
"#define _GCC_PTRDIFF_T", "#define _GCC_PTRDIFF_T\n",
"-e" "/[ \t]ptrdiff_t/a\\\n" "-e" "/[ \t]ptrdiff_t/a\\\n"
"#endif", "#endif\n",
"-e" "/[ \t]wchar_t/i\\\n" "-e" "/[ \t]wchar_t/i\\\n"
"#ifndef _GCC_WCHAR_T\\\n" "#ifndef _GCC_WCHAR_T\\\n"
"#define _GCC_WCHAR_T", "#define _GCC_WCHAR_T\n",
"-e" "/[ \t]wchar_t/a\\\n" "-e" "/[ \t]wchar_t/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3023,7 +3030,7 @@ tTestDesc aVxworks_Needs_VxworksTests[] = { ...@@ -3023,7 +3030,7 @@ tTestDesc aVxworks_Needs_VxworksTests[] = {
*/ */
const char* apzVxworks_Needs_VxworksPatch[] = { "sed", const char* apzVxworks_Needs_VxworksPatch[] = { "sed",
"-e" "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n" "-e" "/#[ \t]define[ \t][ \t]*__INCstath/a\\\n"
"#include <types/vxTypesOld.h>", "#include <types/vxTypesOld.h>\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3067,7 +3074,7 @@ const char* apzVxworks_TimePatch[] = { "sed", ...@@ -3067,7 +3074,7 @@ const char* apzVxworks_TimePatch[] = { "sed",
"typedef void (*__gcc_VOIDFUNCPTR) ();\\\n" "typedef void (*__gcc_VOIDFUNCPTR) ();\\\n"
"#endif\\\n" "#endif\\\n"
"#define __gcc_VOIDFUNCPTR_defined\\\n" "#define __gcc_VOIDFUNCPTR_defined\\\n"
"#endif", "#endif\n",
"-e" "s/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g", "-e" "s/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g",
(char*)NULL }; (char*)NULL };
...@@ -3100,9 +3107,9 @@ const char* apzX11_ClassPatch[] = { "sed", ...@@ -3100,9 +3107,9 @@ const char* apzX11_ClassPatch[] = { "sed",
"-e" "/char [*]class;/i\\\n" "-e" "/char [*]class;/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"\tchar *c_class;\\\n" "\tchar *c_class;\\\n"
"#else", "#else\n",
"-e" "/char [*]class;/a\\\n" "-e" "/char [*]class;/a\\\n"
"#endif", "#endif\n",
(char*)NULL }; (char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * * /* * * * * * * * * * * * * * * * * * * * * * * * * *
...@@ -3163,9 +3170,9 @@ const char* apzX11_NewPatch[] = { "sed", ...@@ -3163,9 +3170,9 @@ const char* apzX11_NewPatch[] = { "sed",
"-e" "/Widget\told, new;/i\\\n" "-e" "/Widget\told, new;/i\\\n"
"#ifdef __cplusplus\\\n" "#ifdef __cplusplus\\\n"
"\tWidget\told, c_new;\\\n" "\tWidget\told, c_new;\\\n"
"#else", "#else\n",
"-e" "/Widget\told, new;/a\\\n" "-e" "/Widget\told, new;/a\\\n"
"#endif", "#endif\n",
"-e" "s/Widget new,/Widget c_new,/g", "-e" "s/Widget new,/Widget c_new,/g",
(char*)NULL }; (char*)NULL };
......
/* -*- 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; autogen definitions inclhack;
...@@ -991,9 +991,12 @@ fix = { ...@@ -991,9 +991,12 @@ fix = {
/* /*
* Remove the double-slash comments * Remove the double-slash comments
* They *must* be removed so it will not create nested 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 = { fix = {
hackname = no_double_slash; hackname = no_double_slash;
test = '-z "`echo ${f}|grep ++`"';
select = '//[^*]'; select = '//[^*]';
sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|"; sed = '/\/\/[^*]/' "s|//\\(.*\\)$|/* \\1 */|";
}; };
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# #
# DO NOT EDIT THIS FILE (inclhack.sh) # 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 # From the definitions inclhack.def
# and the template file inclhack.tpl # and the template file inclhack.tpl
# #
...@@ -14,19 +14,19 @@ ...@@ -14,19 +14,19 @@
# #
# See README-fixinc for more information. # 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 # You may redistribute it and/or modify it under the terms of the
# GNU General Public License, as published by the Free Software # GNU General Public License, as published by the Free Software
# Foundation; either version 2, or (at your option) any later version. # Foundation; either version 2, 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 # but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the GNU General Public License for more details. # See the GNU General Public License for more details.
# #
# You should have received a copy of the GNU General Public License # 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., # write to: The Free Software Foundation, Inc.,
# 59 Temple Place - Suite 330, # 59 Temple Place - Suite 330,
# Boston, MA 02111-1307, USA. # Boston, MA 02111-1307, USA.
...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then ...@@ -80,6 +80,7 @@ if test -z "${target_canonical}" ; then
target_canonical="`config.guess`" ; fi target_canonical="`config.guess`" ; fi
test -z "${target_canonical}" && target_canonical=unknown test -z "${target_canonical}" && target_canonical=unknown
fi fi
export target_canonical
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# #
...@@ -106,7 +107,7 @@ case $LIB in ...@@ -106,7 +107,7 @@ case $LIB in
;; ;;
esac esac
echo Building fixed headers in ${LIB} echo Fixing headers into ${LIB} for ${target_canonical} target
# Determine whether this system has symbolic links. # Determine whether this system has symbolic links.
if ln -s X $LIB/ShouldNotExist 2>/dev/null; then if ln -s X $LIB/ShouldNotExist 2>/dev/null; then
...@@ -322,7 +323,8 @@ while [ $# != 0 ]; do ...@@ -322,7 +323,8 @@ while [ $# != 0 ]; do
fixlist="" fixlist=""
# Aix_Syswait fix #
# Fix 1: Aix_Syswait
# #
case "$file" in ./sys/wait.h ) case "$file" in ./sys/wait.h )
if ( test -n "`egrep 'bos325,' $file`" if ( test -n "`egrep 'bos325,' $file`"
...@@ -330,22 +332,22 @@ while [ $# != 0 ]; do ...@@ -330,22 +332,22 @@ while [ $# != 0 ]; do
fixlist="${fixlist} fixlist="${fixlist}
aix_syswait" aix_syswait"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^extern pid_t wait3();$/i\ sed -e '/^extern pid_t wait3();$/i\
struct rusage; struct rusage;
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Aix_Volatile fix #
# Fix 2: Aix_Volatile
# #
case "$file" in ./sys/signal.h ) case "$file" in ./sys/signal.h )
if ( test -n "`egrep 'typedef volatile int sig_atomic_t' $file`" if ( test -n "`egrep 'typedef volatile int sig_atomic_t' $file`"
...@@ -353,20 +355,20 @@ struct rusage; ...@@ -353,20 +355,20 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
aix_volatile" aix_volatile"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' <&4 > ${DESTDIR}/$file. sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Alpha_Getopt fix #
# Fix 3: Alpha_Getopt
# #
case "$file" in ./stdio.h | \ case "$file" in ./stdio.h | \
./stdlib.h ) ./stdlib.h )
...@@ -375,20 +377,20 @@ struct rusage; ...@@ -375,20 +377,20 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
alpha_getopt" alpha_getopt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/getopt(int, char \*\[\],[ ]*char \*)/getopt(int, char *const[], const char *)/' <&4 > ${DESTDIR}/$file. sed -e 's/getopt(int, char \*\[\],[ ]*char \*)/getopt(int, char *const[], const char *)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Alpha_Parens fix #
# Fix 4: Alpha_Parens
# #
case "$file" in ./sym.h ) case "$file" in ./sym.h )
if ( test -n "`egrep '#ifndef\\(__mips64\\)' $file`" if ( test -n "`egrep '#ifndef\\(__mips64\\)' $file`"
...@@ -396,20 +398,20 @@ struct rusage; ...@@ -396,20 +398,20 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
alpha_parens" alpha_parens"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/#ifndef(__mips64)/#ifndef __mips64/' <&4 > ${DESTDIR}/$file. sed -e 's/#ifndef(__mips64)/#ifndef __mips64/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Alpha_Sbrk fix #
# Fix 5: Alpha_Sbrk
# #
case "$file" in ./unistd.h ) case "$file" in ./unistd.h )
if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' $file`" if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' $file`"
...@@ -417,38 +419,38 @@ struct rusage; ...@@ -417,38 +419,38 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
alpha_sbrk" alpha_sbrk"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' <&4 > ${DESTDIR}/$file. sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Arm_Norcroft_Hint fix #
# Fix 6: Arm_Norcroft_Hint
# #
case "$file" in ./X11/Intrinsic.h ) case "$file" in ./X11/Intrinsic.h )
fixlist="${fixlist} fixlist="${fixlist}
arm_norcroft_hint" arm_norcroft_hint"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/___type p_type/p_type/' <&4 > ${DESTDIR}/$file. sed -e 's/___type p_type/p_type/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Arm_Wchar fix #
# Fix 7: Arm_Wchar
# #
case "$file" in ./stdlib.h ) case "$file" in ./stdlib.h )
if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' $file`" if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' $file`"
...@@ -456,21 +458,21 @@ struct rusage; ...@@ -456,21 +458,21 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
arm_wchar" arm_wchar"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ sed -e 's/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \
-e 's/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' <&4 > ${DESTDIR}/$file. -e 's/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Aux_Asm fix #
# Fix 8: Aux_Asm
# #
case "$file" in ./sys/param.h ) case "$file" in ./sys/param.h )
if ( test -n "`egrep '#ifndef NOINLINE' $file`" if ( test -n "`egrep '#ifndef NOINLINE' $file`"
...@@ -478,29 +480,27 @@ struct rusage; ...@@ -478,29 +480,27 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
aux_asm" aux_asm"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' <&4 > ${DESTDIR}/$file. sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Avoid_Bool fix #
# Fix 9: Avoid_Bool
# #
case "$file" in ./curses.h ) case "$file" in ./curses.h )
fixlist="${fixlist} fixlist="${fixlist}
avoid_bool" avoid_bool"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\ sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\
#ifndef __cplusplus #ifndef __cplusplus
...@@ -513,14 +513,16 @@ struct rusage; ...@@ -513,14 +513,16 @@ struct rusage;
' \ ' \
-e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\ -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Bad_Malloc_Decl fix #
# Fix 10: Bad_Malloc_Decl
# #
case "$file" in ./rpc/types.h ) case "$file" in ./rpc/types.h )
if ( test -z "`egrep '\"C\"' $file`" if ( test -z "`egrep '\"C\"' $file`"
...@@ -528,10 +530,8 @@ struct rusage; ...@@ -528,10 +530,8 @@ struct rusage;
fixlist="${fixlist} fixlist="${fixlist}
bad_malloc_decl" bad_malloc_decl"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -543,15 +543,17 @@ extern "C" {\ ...@@ -543,15 +543,17 @@ extern "C" {\
#ifdef __cplusplus\ #ifdef __cplusplus\
}\ }\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Bad_Struct_Term fix #
# Fix 11: Bad_Struct_Term
# #
case "$file" in ./curses.h ) case "$file" in ./curses.h )
if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' $file`" if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' $file`"
...@@ -559,38 +561,38 @@ extern "C" {\ ...@@ -559,38 +561,38 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
bad_struct_term" bad_struct_term"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' <&4 > ${DESTDIR}/$file. sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Badquote fix #
# Fix 12: Badquote
# #
case "$file" in ./sundev/vuid_event.h ) case "$file" in ./sundev/vuid_event.h )
fixlist="${fixlist} fixlist="${fixlist}
badquote" badquote"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/doesn'\''t/does not/' <&4 > ${DESTDIR}/$file. sed -e 's/doesn'\''t/does not/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Broken_Assert_Stdio fix #
# Fix 13: Broken_Assert_Stdio
# #
case "$file" in ./assert.h ) case "$file" in ./assert.h )
if ( test -n "`egrep 'stderr' $file`" -a \ if ( test -n "`egrep 'stderr' $file`" -a \
...@@ -599,22 +601,22 @@ extern "C" {\ ...@@ -599,22 +601,22 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
broken_assert_stdio" broken_assert_stdio"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
#include <stdio.h> #include <stdio.h>
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Broken_Assert_Stdlib fix #
# Fix 14: Broken_Assert_Stdlib
# #
case "$file" in ./assert.h ) case "$file" in ./assert.h )
if ( test -n "`egrep 'exit *\\(|abort *\\(' $file`" -a \ if ( test -n "`egrep 'exit *\\(|abort *\\(' $file`" -a \
...@@ -623,44 +625,43 @@ extern "C" {\ ...@@ -623,44 +625,43 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
broken_assert_stdlib" broken_assert_stdlib"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
#ifdef __cplusplus\ #ifdef __cplusplus\
#include <stdlib.h>\ #include <stdlib.h>\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Bsd43_Io_Macros fix #
# Fix 15: Bsd43_Io_Macros
# #
if ( test -n "`egrep 'BSD43__IO' $file`" if ( test -n "`egrep 'BSD43__IO' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
bsd43_io_macros" bsd43_io_macros"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \ sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \
-e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. -e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Cxx_Cmnt_Hpux fix #
# Fix 16: Cxx_Cmnt_Hpux
# #
case "$file" in ./sys/pci.h ) case "$file" in ./sys/pci.h )
if ( test -n "`egrep 'System Private Structures' $file`" if ( test -n "`egrep 'System Private Structures' $file`"
...@@ -668,20 +669,20 @@ extern "C" {\ ...@@ -668,20 +669,20 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
cxx_cmnt_hpux" cxx_cmnt_hpux"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. sed -e 's|//.*$||g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Cxx_Cmnt_Irix fix #
# Fix 17: Cxx_Cmnt_Irix
# #
case "$file" in ./fam.h ) case "$file" in ./fam.h )
if ( test -n "`egrep 'indigo.esd' $file`" if ( test -n "`egrep 'indigo.esd' $file`"
...@@ -689,39 +690,39 @@ extern "C" {\ ...@@ -689,39 +690,39 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
cxx_cmnt_irix" cxx_cmnt_irix"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. sed -e 's|//.*$||g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Cxx_Cmnt_Sunos fix #
# Fix 18: Cxx_Cmnt_Sunos
# #
case "$file" in ./sbusdev/audiovar.h | \ case "$file" in ./sbusdev/audiovar.h | \
./sys/audiovar.h ) ./sys/audiovar.h )
fixlist="${fixlist} fixlist="${fixlist}
cxx_cmnt_sunos" cxx_cmnt_sunos"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. sed -e 's|//.*$||g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Cxx_Cmnt_Vxworks fix #
# Fix 19: Cxx_Cmnt_Vxworks
# #
case "$file" in ./drv/netif/if_med.h ) case "$file" in ./drv/netif/if_med.h )
if ( test -n "`egrep 'Wind River' $file`" if ( test -n "`egrep 'Wind River' $file`"
...@@ -729,49 +730,47 @@ extern "C" {\ ...@@ -729,49 +730,47 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
cxx_cmnt_vxworks" cxx_cmnt_vxworks"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|//.*$||g' <&4 > ${DESTDIR}/$file. sed -e 's|//.*$||g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Ecd_Cursor fix #
# Fix 20: Ecd_Cursor
# #
case "$file" in ./sunwindow/win_lock.h | \ case "$file" in ./sunwindow/win_lock.h | \
./sunwindow/win_cursor.h ) ./sunwindow/win_cursor.h )
fixlist="${fixlist} fixlist="${fixlist}
ecd_cursor" ecd_cursor"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/ecd.cursor/ecd_cursor/' <&4 > ${DESTDIR}/$file. sed -e 's/ecd.cursor/ecd_cursor/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Else_Label fix #
# Fix 21: Else_Label
# #
if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' $file`" if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
else_label" else_label"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e ':loop sed -e ':loop
/\\$/N /\\$/N
...@@ -779,24 +778,23 @@ s/\\$/\\+++fixinc_eol+++/ ...@@ -779,24 +778,23 @@ s/\\$/\\+++fixinc_eol+++/
/\\$/b loop /\\$/b loop
s/\\+++fixinc_eol+++/\\/g s/\\+++fixinc_eol+++/\\/g
s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1% s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1%
s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' <&4 > ${DESTDIR}/$file. s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Endif_Label fix #
# Fix 22: Endif_Label
# #
if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-~]' $file`" if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-~]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
endif_label" endif_label"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e ':loop sed -e ':loop
/\\$/N /\\$/N
...@@ -805,14 +803,15 @@ s/\\$/\\+++fixinc_eol+++/ ...@@ -805,14 +803,15 @@ s/\\$/\\+++fixinc_eol+++/
s/\\+++fixinc_eol+++/\\/g s/\\+++fixinc_eol+++/\\/g
s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1% s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1%
s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1% s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1%
s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file. s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Hp_Inline fix #
# Fix 23: Hp_Inline
# #
case "$file" in ./sys/spinlock.h ) case "$file" in ./sys/spinlock.h )
if ( test -n "`egrep 'include.*\"\\.\\./machine/' $file`" if ( test -n "`egrep 'include.*\"\\.\\./machine/' $file`"
...@@ -820,21 +819,21 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file. ...@@ -820,21 +819,21 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file.
fixlist="${fixlist} fixlist="${fixlist}
hp_inline" hp_inline"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's,"../machine/inline.h",<machine/inline.h>,' \ sed -e 's,"../machine/inline.h",<machine/inline.h>,' \
-e 's,"../machine/psl.h",<machine/psl.h>,' <&4 > ${DESTDIR}/$file. -e 's,"../machine/psl.h",<machine/psl.h>,' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Hp_Sysfile fix #
# Fix 24: Hp_Sysfile
# #
case "$file" in ./sys/file.h ) case "$file" in ./sys/file.h )
if ( test -n "`egrep 'HPUX_SOURCE' $file`" if ( test -n "`egrep 'HPUX_SOURCE' $file`"
...@@ -842,20 +841,20 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file. ...@@ -842,20 +841,20 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file.
fixlist="${fixlist} fixlist="${fixlist}
hp_sysfile" hp_sysfile"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/(\.\.\.)/(struct file * ...)/' <&4 > ${DESTDIR}/$file. sed -e 's/(\.\.\.)/(struct file * ...)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Hpux_Cxx_Unready fix #
# Fix 25: Hpux_Cxx_Unready
# #
case "$file" in ./assert.h | \ case "$file" in ./assert.h | \
./sys/mman.h ) ./sys/mman.h )
...@@ -864,10 +863,8 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file. ...@@ -864,10 +863,8 @@ s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' <&4 > ${DESTDIR}/$file.
fixlist="${fixlist} fixlist="${fixlist}
hpux_cxx_unready" hpux_cxx_unready"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -879,38 +876,40 @@ extern "C" {\ ...@@ -879,38 +876,40 @@ extern "C" {\
#ifdef __cplusplus\ #ifdef __cplusplus\
}\ }\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Hpux_Maxint fix #
# Fix 26: Hpux_Maxint
# #
case "$file" in ./sys/param.h ) case "$file" in ./sys/param.h )
fixlist="${fixlist} fixlist="${fixlist}
hpux_maxint" hpux_maxint"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^#[ ]*define[ ]*MAXINT[ ]/i\ sed -e '/^#[ ]*define[ ]*MAXINT[ ]/i\
#ifndef MAXINT #ifndef MAXINT
' \ ' \
-e '/^#[ ]*define[ ]*MAXINT[ ]/a\ -e '/^#[ ]*define[ ]*MAXINT[ ]/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Hpux_Systime fix #
# Fix 27: Hpux_Systime
# #
case "$file" in ./sys/time.h ) case "$file" in ./sys/time.h )
if ( test -n "`egrep '^extern struct sigevent;' $file`" if ( test -n "`egrep '^extern struct sigevent;' $file`"
...@@ -918,20 +917,20 @@ extern "C" {\ ...@@ -918,20 +917,20 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
hpux_systime" hpux_systime"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^extern struct sigevent;/struct sigevent;/' <&4 > ${DESTDIR}/$file. sed -e 's/^extern struct sigevent;/struct sigevent;/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Interactv_Add1 fix #
# Fix 28: Interactv_Add1
# #
case "$file" in ./stdio.h | \ case "$file" in ./stdio.h | \
./math.h | \ ./math.h | \
...@@ -945,20 +944,20 @@ extern "C" {\ ...@@ -945,20 +944,20 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
interactv_add1" interactv_add1"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/' <&4 > ${DESTDIR}/$file. sed -e 's/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Interactv_Add2 fix #
# Fix 29: Interactv_Add2
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \ if ( test '(' -d /etc/conf/kconfig.d ')' -a \
...@@ -967,20 +966,20 @@ extern "C" {\ ...@@ -967,20 +966,20 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
interactv_add2" interactv_add2"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/fmod(double)/fmod(double, double)/' <&4 > ${DESTDIR}/$file. sed -e 's/fmod(double)/fmod(double, double)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Interactv_Add3 fix #
# Fix 30: Interactv_Add3
# #
case "$file" in ./sys/limits.h ) case "$file" in ./sys/limits.h )
if ( test '(' -d /etc/conf/kconfig.d ')' -a \ if ( test '(' -d /etc/conf/kconfig.d ')' -a \
...@@ -989,121 +988,119 @@ extern "C" {\ ...@@ -989,121 +988,119 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
interactv_add3" interactv_add3"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/CHILD_MAX/s,/\* Max, Max,' \ sed -e '/CHILD_MAX/s,/\* Max, Max,' \
-e '/OPEN_MAX/s,/\* Max, Max,' <&4 > ${DESTDIR}/$file. -e '/OPEN_MAX/s,/\* Max, Max,' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Io_Def_Quotes fix #
# Fix 31: Io_Def_Quotes
# #
if ( test -n "`egrep '[ ]_IO[A-Z]*[ ]*\\([A-Za-z]' $file`" if ( test -n "`egrep '[ ]_IO[A-Z]*[ ]*\\([A-Za-z]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
io_def_quotes" io_def_quotes"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/\([ ]_IO[A-Z]*[ ]*(\)\([A-Za-z]\),/\1'\''\2'\'',/' \ sed -e 's/\([ ]_IO[A-Z]*[ ]*(\)\([A-Za-z]\),/\1'\''\2'\'',/' \
-e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \ -e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. -e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Ioctl_Fix_Ctrl fix #
# Fix 32: Ioctl_Fix_Ctrl
# #
if ( test -n "`egrep 'CTRL[ ]' $file`" if ( test -n "`egrep 'CTRL[ ]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
ioctl_fix_ctrl" ioctl_fix_ctrl"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \
-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[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ -e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
-e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' <&4 > ${DESTDIR}/$file. -e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Ip_Missing_Semi fix #
# Fix 33: Ip_Missing_Semi
# #
case "$file" in ./netinet/ip.h ) case "$file" in ./netinet/ip.h )
fixlist="${fixlist} fixlist="${fixlist}
ip_missing_semi" ip_missing_semi"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^struct/,/^};/s/}$/};/' <&4 > ${DESTDIR}/$file. sed -e '/^struct/,/^};/s/}$/};/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Irix_Bogus_Cxx_Cmnt fix #
# Fix 34: Irix_Bogus_Cxx_Cmnt
# #
case "$file" in ./elf_abi.h | \ case "$file" in ./elf_abi.h | \
./elf.h ) ./elf.h )
fixlist="${fixlist} fixlist="${fixlist}
irix_bogus_cxx_cmnt" irix_bogus_cxx_cmnt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@"/\*"\*/@"//"@' <&4 > ${DESTDIR}/$file. sed -e 's@"/\*"\*/@"//"@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Irix_Multiline_Cmnt fix #
# Fix 35: Irix_Multiline_Cmnt
# #
case "$file" in ./sys/types.h ) case "$file" in ./sys/types.h )
fixlist="${fixlist} fixlist="${fixlist}
irix_multiline_cmnt" irix_multiline_cmnt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@type of the result@type of the result */@' \ sed -e 's@type of the result@type of the result */@' \
-e 's@of the sizeof@/* of the sizeof@' <&4 > ${DESTDIR}/$file. -e 's@of the sizeof@/* of the sizeof@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Irix_Sockaddr fix #
# Fix 36: Irix_Sockaddr
# #
case "$file" in ./rpc/auth.h ) case "$file" in ./rpc/auth.h )
if ( test -n "`egrep 'authdes_create.*struct sockaddr' $file`" if ( test -n "`egrep 'authdes_create.*struct sockaddr' $file`"
...@@ -1111,42 +1108,42 @@ extern "C" {\ ...@@ -1111,42 +1108,42 @@ extern "C" {\
fixlist="${fixlist} fixlist="${fixlist}
irix_sockaddr" irix_sockaddr"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/authdes_create.*struct sockaddr/i\ sed -e '/authdes_create.*struct sockaddr/i\
struct sockaddr; struct sockaddr;
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Irix_Struct__File fix #
# Fix 37: Irix_Struct__File
# #
case "$file" in ./rpc/xdr.h ) case "$file" in ./rpc/xdr.h )
fixlist="${fixlist} fixlist="${fixlist}
irix_struct__file" irix_struct__file"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/xdrstdio_create.*struct __file_s/i\ sed -e '/xdrstdio_create.*struct __file_s/i\
struct __file_s; struct __file_s;
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Isc_Fmod fix #
# Fix 38: Isc_Fmod
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
if ( test -n "`egrep 'fmod\\(double\\)' $file`" if ( test -n "`egrep 'fmod\\(double\\)' $file`"
...@@ -1154,20 +1151,20 @@ struct __file_s; ...@@ -1154,20 +1151,20 @@ struct __file_s;
fixlist="${fixlist} fixlist="${fixlist}
isc_fmod" isc_fmod"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/fmod(double)/fmod(double, double)/' <&4 > ${DESTDIR}/$file. sed -e 's/fmod(double)/fmod(double, double)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Isc_Sys_Limits fix #
# Fix 39: Isc_Sys_Limits
# #
case "$file" in ./sys/limits.h ) case "$file" in ./sys/limits.h )
if ( test -n "`egrep 'CHILD_MAX' $file`" if ( test -n "`egrep 'CHILD_MAX' $file`"
...@@ -1175,21 +1172,21 @@ struct __file_s; ...@@ -1175,21 +1172,21 @@ struct __file_s;
fixlist="${fixlist} fixlist="${fixlist}
isc_sys_limits" isc_sys_limits"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/CHILD_MAX/s,/\* Max, Max,' \ sed -e '/CHILD_MAX/s,/\* Max, Max,' \
-e '/OPEN_MAX/s,/\* Max, Max,' <&4 > ${DESTDIR}/$file. -e '/OPEN_MAX/s,/\* Max, Max,' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Kandr_Concat fix #
# Fix 40: Kandr_Concat
# #
case "$file" in ./sparc/asm_linkage.h | \ case "$file" in ./sparc/asm_linkage.h | \
./sun3/asm_linkage.h | \ ./sun3/asm_linkage.h | \
...@@ -1214,20 +1211,20 @@ struct __file_s; ...@@ -1214,20 +1211,20 @@ struct __file_s;
fixlist="${fixlist} fixlist="${fixlist}
kandr_concat" kandr_concat"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's|/\*\*/| ## |g' <&4 > ${DESTDIR}/$file. sed -e 's|/\*\*/| ## |g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Limits_Ifndefs fix #
# Fix 41: Limits_Ifndefs
# #
case "$file" in ./limits.h ) case "$file" in ./limits.h )
if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' $file`" if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' $file`"
...@@ -1235,10 +1232,8 @@ struct __file_s; ...@@ -1235,10 +1232,8 @@ struct __file_s;
fixlist="${fixlist} fixlist="${fixlist}
limits_ifndefs" limits_ifndefs"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/[ ]FLT_MIN[ ]/i\ sed -e '/[ ]FLT_MIN[ ]/i\
#ifndef FLT_MIN #ifndef FLT_MIN
...@@ -1275,15 +1270,17 @@ struct __file_s; ...@@ -1275,15 +1270,17 @@ struct __file_s;
' \ ' \
-e '/[ ]DBL_DIG[ ]/a\ -e '/[ ]DBL_DIG[ ]/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Lynx_Void_Int fix #
# Fix 42: Lynx_Void_Int
# #
case "$file" in ./curses.h ) case "$file" in ./curses.h )
if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' $file`" if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' $file`"
...@@ -1291,47 +1288,46 @@ struct __file_s; ...@@ -1291,47 +1288,46 @@ struct __file_s;
fixlist="${fixlist} fixlist="${fixlist}
lynx_void_int" lynx_void_int"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/#[ ]*define[ ][ ]*void[ ]int/d' <&4 > ${DESTDIR}/$file. sed -e '/#[ ]*define[ ][ ]*void[ ]int/d' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Lynxos_Fcntl_Proto fix #
# Fix 43: Lynxos_Fcntl_Proto
# #
case "$file" in ./fcntl.h ) case "$file" in ./fcntl.h )
fixlist="${fixlist} fixlist="${fixlist}
lynxos_fcntl_proto" lynxos_fcntl_proto"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' <&4 > ${DESTDIR}/$file. sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# M88k_Bad_Hypot_Opt fix #
# Fix 44: M88k_Bad_Hypot_Opt
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
fixlist="${fixlist} fixlist="${fixlist}
m88k_bad_hypot_opt" m88k_bad_hypot_opt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \ sed -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \
-e '/^extern double hypot();$/a\ -e '/^extern double hypot();$/a\
...@@ -1347,47 +1343,53 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1347,47 +1343,53 @@ static __inline__ double fake_hypot (x, y)\
return fabs (hypot (x, y));\ return fabs (hypot (x, y));\
}\ }\
#define hypot fake_hypot #define hypot fake_hypot
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for machine type test
esac
;; # case end for file name test
esac esac
# M88k_Bad_S_If fix #
# Fix 45: M88k_Bad_S_If
# #
case "$file" in ./sys/stat.h ) case "$file" in ./sys/stat.h )
case "$target_canonical" in m88k-*-sysv3* )
if ( test -n "`egrep '#define[ ]+S_IS[A-Z]*(m)[ ]' $file`" if ( test -n "`egrep '#define[ ]+S_IS[A-Z]*(m)[ ]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
m88k_bad_s_if" m88k_bad_s_if"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; 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)/' \ 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. -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(0[0-9]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for machine type test
esac
;; # case end for file name test
esac esac
# M88k_Multi_Incl fix #
# Fix 46: M88k_Multi_Incl
# #
case "$file" in ./time.h ) case "$file" in ./time.h )
case "$target_canonical" in m88k-tektronix-sysv3* )
if ( test -z "`egrep '#ifndef' $file`" if ( test -z "`egrep '#ifndef' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
m88k_multi_incl" m88k_multi_incl"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
( echo Fixing $file, to protect against multiple inclusion. >&2 ( echo Fixing $file, to protect against multiple inclusion. >&2
cpp_wrapper=`echo $file | sed -e 's,\.,_,g' -e 's,/,_,g'` cpp_wrapper=`echo $file | sed -e 's,\.,_,g' -e 's,/,_,g'`
sed -e "1i\ sed -e "1i\
...@@ -1396,30 +1398,32 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1396,30 +1398,32 @@ static __inline__ double fake_hypot (x, y)\
" \ " \
-e "$a\ -e "$a\
#endif /* ! __GCC_GOT_${cpp_wrapper}_ */ #endif /* ! __GCC_GOT_${cpp_wrapper}_ */
" ) <&4 > ${DESTDIR}/$file. " ) < $infile > ${DESTDIR}/$file.
exec 4<&-
# Shell scripts have the potential of removing the output # 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. if test ! -f ${DESTDIR}/$file.
then continue ; fi then continue ; fi
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for machine type test
esac
;; # case end for file name test
esac esac
# Machine_Name fix #
# Fix 47: Machine_Name
# #
if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' $file`" if ( test -n "`egrep '^#[ ]*(if|elif).*[^a-zA-Z0-9_](_*[MSRrhim]|[Mbimnpstuv])[a-zA-Z0-9_]' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
machine_name" machine_name"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e ':loop sed -e ':loop
/\\$/N /\\$/N
...@@ -1455,14 +1459,15 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1455,14 +1459,15 @@ s/\\+++fixinc_eol+++/\\/g
s/ unix / __unix__ /g s/ unix / __unix__ /g
s/ vax / __vax__ /g s/ vax / __vax__ /g
s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g
}' <&4 > ${DESTDIR}/$file. }' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Math_Exception fix #
# Fix 48: Math_Exception
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
if ( test -n "`egrep 'struct exception' $file`" if ( test -n "`egrep 'struct exception' $file`"
...@@ -1470,10 +1475,8 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1470,10 +1475,8 @@ s/\\+++fixinc_eol+++/\\/g
fixlist="${fixlist} fixlist="${fixlist}
math_exception" math_exception"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/struct exception/i\ sed -e '/struct exception/i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -1494,24 +1497,24 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1494,24 +1497,24 @@ s/\\+++fixinc_eol+++/\\/g
#ifdef __cplusplus\ #ifdef __cplusplus\
#undef exception\ #undef exception\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Math_Gcc_Ifndefs fix #
# Fix 49: Math_Gcc_Ifndefs
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
fixlist="${fixlist} fixlist="${fixlist}
math_gcc_ifndefs" math_gcc_ifndefs"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
( dbl_max_def="`egrep 'define[ ]+DBL_MAX[ ]+.*' ${SRCDIR}/float.h 2>/dev/null`" ( dbl_max_def="`egrep 'define[ ]+DBL_MAX[ ]+.*' ${SRCDIR}/float.h 2>/dev/null`"
if ( test -n "${dbl_max_def}" \ if ( test -n "${dbl_max_def}" \
...@@ -1531,30 +1534,31 @@ s/\\+++fixinc_eol+++/\\/g ...@@ -1531,30 +1534,31 @@ s/\\+++fixinc_eol+++/\\/g
-e '/define[ ]HUGE_VAL[ ]/a\ -e '/define[ ]HUGE_VAL[ ]/a\
#endif #endif
' '
fi ) <&4 > ${DESTDIR}/$file. fi ) < $infile > ${DESTDIR}/$file.
exec 4<&-
# Shell scripts have the potential of removing the output # 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. if test ! -f ${DESTDIR}/$file.
then continue ; fi then continue ; fi
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Motorola_Stupid_Opt fix #
# Fix 50: Motorola_Stupid_Opt
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
case "$target_canonical" in m88k-motorola-sysv3* )
if ( test -n "`egrep '^extern double hypot();$' $file`" if ( test -n "`egrep '^extern double hypot();$' $file`"
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
motorola_stupid_opt" motorola_stupid_opt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^extern double hypot();$/a\ sed -e '/^extern double hypot();$/a\
\/* Workaround a stupid Motorola optimization if one\ \/* Workaround a stupid Motorola optimization if one\
...@@ -1569,33 +1573,37 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1569,33 +1573,37 @@ static __inline__ double fake_hypot (x, y)\
return fabs (hypot (x, y));\ return fabs (hypot (x, y));\
}\ }\
#define hypot fake_hypot #define hypot fake_hypot
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for machine type test
esac
;; # case end for file name test
esac esac
# Nested_Comment fix #
# Fix 51: Nested_Comment
# #
case "$file" in ./rpc/rpc.h ) case "$file" in ./rpc/rpc.h )
fixlist="${fixlist} fixlist="${fixlist}
nested_comment" nested_comment"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@' <&4 > ${DESTDIR}/$file. sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# News_Os_Recursion fix #
# Fix 52: News_Os_Recursion
# #
case "$file" in ./stdlib.h ) case "$file" in ./stdlib.h )
if ( test -n "`egrep '#include <stdlib.h>' $file`" if ( test -n "`egrep '#include <stdlib.h>' $file`"
...@@ -1603,25 +1611,25 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1603,25 +1611,25 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
news_os_recursion" news_os_recursion"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^#include <stdlib.h>/i\ sed -e '/^#include <stdlib.h>/i\
#ifdef BOGUS_RECURSION #ifdef BOGUS_RECURSION
' \ ' \
-e '/^#include <stdlib.h>/a\ -e '/^#include <stdlib.h>/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Next_Math_Prefix fix #
# Fix 53: Next_Math_Prefix
# #
case "$file" in ./ansi/math.h ) case "$file" in ./ansi/math.h )
if ( test -n "`egrep '^extern.*double.*__const__.*' $file`" if ( test -n "`egrep '^extern.*double.*__const__.*' $file`"
...@@ -1629,24 +1637,24 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1629,24 +1637,24 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
next_math_prefix" next_math_prefix"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^extern.*double.*__const__.*sqrt(/s/__const__//' \ sed -e '/^extern.*double.*__const__.*sqrt(/s/__const__//' \
-e '/^extern.*double.*__const__.*fabs(/s/__const__//' \ -e '/^extern.*double.*__const__.*fabs(/s/__const__//' \
-e '/^extern.*double.*__const__.*cos(/s/__const__//' \ -e '/^extern.*double.*__const__.*cos(/s/__const__//' \
-e '/^extern.*double.*__const__.*hypot(/s/__const__//' \ -e '/^extern.*double.*__const__.*hypot(/s/__const__//' \
-e '/^extern.*double.*__const__.*sin(/s/__const__//' <&4 > ${DESTDIR}/$file. -e '/^extern.*double.*__const__.*sin(/s/__const__//' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Next_Template fix #
# Fix 54: Next_Template
# #
case "$file" in ./bsd/libc.h ) case "$file" in ./bsd/libc.h )
if ( test -n "`egrep 'template' $file`" if ( test -n "`egrep 'template' $file`"
...@@ -1654,21 +1662,21 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1654,21 +1662,21 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
next_template" next_template"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/\(.*template\)/s/template//' \ sed -e '/\(.*template\)/s/template//' \
-e '/extern.*volatile.*void.*abort/s/volatile//' <&4 > ${DESTDIR}/$file. -e '/extern.*volatile.*void.*abort/s/volatile//' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Next_Volitile fix #
# Fix 55: Next_Volitile
# #
case "$file" in ./ansi/stdlib.h ) case "$file" in ./ansi/stdlib.h )
if ( test -n "`egrep 'volatile' $file`" if ( test -n "`egrep 'volatile' $file`"
...@@ -1676,21 +1684,21 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1676,21 +1684,21 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
next_volitile" next_volitile"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/extern.*volatile.*void.*exit/s/volatile//' \ sed -e '/extern.*volatile.*void.*exit/s/volatile//' \
-e '/extern.*volatile.*void.*abort/s/volatile//' <&4 > ${DESTDIR}/$file. -e '/extern.*volatile.*void.*abort/s/volatile//' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Next_Wait_Union fix #
# Fix 56: Next_Wait_Union
# #
case "$file" in ./sys/wait.h ) case "$file" in ./sys/wait.h )
if ( test -n "`egrep 'wait\\(union wait' $file`" if ( test -n "`egrep 'wait\\(union wait' $file`"
...@@ -1698,57 +1706,57 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1698,57 +1706,57 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
next_wait_union" next_wait_union"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@wait(union wait@wait(void@' <&4 > ${DESTDIR}/$file. sed -e 's@wait(union wait@wait(void@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# No_Double_Slash fix
# #
if ( test -n "`egrep '//[^*]' $file`" # Fix 57: No_Double_Slash
#
if ( test -n "`egrep '//[^*]' $file`" -a \
'(' -z "`echo ${f}|grep ++`" ')'
) > /dev/null 2>&1 ; then ) > /dev/null 2>&1 ; then
fixlist="${fixlist} fixlist="${fixlist}
no_double_slash" no_double_slash"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/\/\/[^*]/s|//\(.*\)$|/* \1 */|' <&4 > ${DESTDIR}/$file. sed -e '/\/\/[^*]/s|//\(.*\)$|/* \1 */|' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Nodeent_Syntax fix #
# Fix 58: Nodeent_Syntax
# #
case "$file" in ./netdnet/dnetdb.h ) case "$file" in ./netdnet/dnetdb.h )
fixlist="${fixlist} fixlist="${fixlist}
nodeent_syntax" nodeent_syntax"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/char.*na_addr *$/char *na_addr;/' <&4 > ${DESTDIR}/$file. sed -e 's/char.*na_addr *$/char *na_addr;/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Osf_Namespace_A fix #
# Fix 59: Osf_Namespace_A
# #
case "$file" in ./reg_types.h | \ case "$file" in ./reg_types.h | \
./sys/lc_core.h ) ./sys/lc_core.h )
...@@ -1757,22 +1765,22 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1757,22 +1765,22 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
osf_namespace_a" osf_namespace_a"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/regex_t/__regex_t/g' \ sed -e 's/regex_t/__regex_t/g' \
-e 's/regoff_t/__regoff_t/g' \ -e 's/regoff_t/__regoff_t/g' \
-e 's/regmatch_t/__regmatch_t/g' <&4 > ${DESTDIR}/$file. -e 's/regmatch_t/__regmatch_t/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Osf_Namespace_B fix #
# Fix 60: Osf_Namespace_B
# #
case "$file" in ./regex.h ) 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`" ')' 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`" ')'
...@@ -1780,24 +1788,24 @@ static __inline__ double fake_hypot (x, y)\ ...@@ -1780,24 +1788,24 @@ static __inline__ double fake_hypot (x, y)\
fixlist="${fixlist} fixlist="${fixlist}
osf_namespace_b" osf_namespace_b"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/#include <reg_types.h>/a\ sed -e '/#include <reg_types.h>/a\
typedef __regex_t regex_t;\ typedef __regex_t regex_t;\
typedef __regoff_t regoff_t;\ typedef __regoff_t regoff_t;\
typedef __regmatch_t regmatch_t; typedef __regmatch_t regmatch_t;
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Pthread_Page_Size fix #
# Fix 61: Pthread_Page_Size
# #
case "$file" in ./pthread.h ) case "$file" in ./pthread.h )
if ( test -n "`egrep '^int __page_size' $file`" if ( test -n "`egrep '^int __page_size' $file`"
...@@ -1805,20 +1813,20 @@ typedef __regmatch_t regmatch_t; ...@@ -1805,20 +1813,20 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
pthread_page_size" pthread_page_size"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^int __page_size/extern int __page_size/' <&4 > ${DESTDIR}/$file. sed -e 's/^int __page_size/extern int __page_size/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Rs6000_Double fix #
# Fix 62: Rs6000_Double
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
if ( test -n "`egrep '[^a-zA-Z_]class\\(' $file`" if ( test -n "`egrep '[^a-zA-Z_]class\\(' $file`"
...@@ -1826,25 +1834,25 @@ typedef __regmatch_t regmatch_t; ...@@ -1826,25 +1834,25 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
rs6000_double" rs6000_double"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/class[(]/i\ sed -e '/class[(]/i\
#ifndef __cplusplus #ifndef __cplusplus
' \ ' \
-e '/class[(]/a\ -e '/class[(]/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Rs6000_Fchmod fix #
# Fix 63: Rs6000_Fchmod
# #
case "$file" in ./sys/stat.h ) case "$file" in ./sys/stat.h )
if ( test -n "`egrep 'fchmod\\(char' $file`" if ( test -n "`egrep 'fchmod\\(char' $file`"
...@@ -1852,39 +1860,39 @@ typedef __regmatch_t regmatch_t; ...@@ -1852,39 +1860,39 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
rs6000_fchmod" rs6000_fchmod"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/fchmod(char \*/fchmod(int/' <&4 > ${DESTDIR}/$file. sed -e 's/fchmod(char \*/fchmod(int/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Rs6000_Param fix #
# Fix 64: Rs6000_Param
# #
case "$file" in ./stdio.h | \ case "$file" in ./stdio.h | \
./unistd.h ) ./unistd.h )
fixlist="${fixlist} fixlist="${fixlist}
rs6000_param" rs6000_param"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' <&4 > ${DESTDIR}/$file. sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sony_Include fix #
# Fix 65: Sony_Include
# #
case "$file" in ./machine/machparam.h ) case "$file" in ./machine/machparam.h )
if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' $file`" if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' $file`"
...@@ -1892,20 +1900,20 @@ typedef __regmatch_t regmatch_t; ...@@ -1892,20 +1900,20 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
sony_include" sony_include"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@"../machine/endian.h"@<machine/endian.h>@' <&4 > ${DESTDIR}/$file. sed -e 's@"../machine/endian.h"@<machine/endian.h>@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Statsswtch fix #
# Fix 66: Statsswtch
# #
case "$file" in ./rpcsvc/rstat.h ) case "$file" in ./rpcsvc/rstat.h )
if ( test -n "`egrep 'boottime$' $file`" if ( test -n "`egrep 'boottime$' $file`"
...@@ -1913,29 +1921,27 @@ typedef __regmatch_t regmatch_t; ...@@ -1913,29 +1921,27 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
statsswtch" statsswtch"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/boottime$/boottime;/' <&4 > ${DESTDIR}/$file. sed -e 's/boottime$/boottime;/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Stdio_Va_List fix #
# Fix 67: Stdio_Va_List
# #
case "$file" in ./stdio.h ) case "$file" in ./stdio.h )
fixlist="${fixlist} fixlist="${fixlist}
stdio_va_list" stdio_va_list"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then ( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then
: :
else else
...@@ -1953,19 +1959,21 @@ typedef __regmatch_t regmatch_t; ...@@ -1953,19 +1959,21 @@ typedef __regmatch_t regmatch_t;
-e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \ -e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \
-e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \ -e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \
-e 's@VA_LIST@DUMMY_VA_LIST@' \ -e 's@VA_LIST@DUMMY_VA_LIST@' \
-e 's@_Va_LIST@_VA_LIST@' ) <&4 > ${DESTDIR}/$file. -e 's@_Va_LIST@_VA_LIST@' ) < $infile > ${DESTDIR}/$file.
exec 4<&-
# Shell scripts have the potential of removing the output # 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. if test ! -f ${DESTDIR}/$file.
then continue ; fi then continue ; fi
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sun_Bogus_Ifdef fix #
# Fix 68: Sun_Bogus_Ifdef
# #
case "$file" in ./hsfs/hsfs_spec.h | \ case "$file" in ./hsfs/hsfs_spec.h | \
./hsfs/iso_spec.h ) ./hsfs/iso_spec.h )
...@@ -1974,20 +1982,20 @@ typedef __regmatch_t regmatch_t; ...@@ -1974,20 +1982,20 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
sun_bogus_ifdef" sun_bogus_ifdef"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' <&4 > ${DESTDIR}/$file. sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Bogus_Ifdef_Sun4c fix #
# Fix 69: Sun_Bogus_Ifdef_Sun4c
# #
case "$file" in ./hsfs/hsnode.h ) case "$file" in ./hsfs/hsnode.h )
if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' $file`" if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' $file`"
...@@ -1995,20 +2003,20 @@ typedef __regmatch_t regmatch_t; ...@@ -1995,20 +2003,20 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
sun_bogus_ifdef_sun4c" sun_bogus_ifdef_sun4c"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' <&4 > ${DESTDIR}/$file. sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Catmacro fix #
# Fix 70: Sun_Catmacro
# #
case "$file" in ./pixrect/memvar.h ) case "$file" in ./pixrect/memvar.h )
if ( test -n "`egrep '^#define[ ]+CAT(a,b)' $file`" if ( test -n "`egrep '^#define[ ]+CAT(a,b)' $file`"
...@@ -2016,10 +2024,8 @@ typedef __regmatch_t regmatch_t; ...@@ -2016,10 +2024,8 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
sun_catmacro" sun_catmacro"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^#define[ ]CAT(a,b)/ i\ sed -e '/^#define[ ]CAT(a,b)/ i\
#ifdef __STDC__ \ #ifdef __STDC__ \
...@@ -2028,36 +2034,38 @@ typedef __regmatch_t regmatch_t; ...@@ -2028,36 +2034,38 @@ typedef __regmatch_t regmatch_t;
' \ ' \
-e '/^#define[ ]CAT(a,b)/ a\ -e '/^#define[ ]CAT(a,b)/ a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Malloc fix #
# Fix 71: Sun_Malloc
# #
case "$file" in ./malloc.h ) case "$file" in ./malloc.h )
fixlist="${fixlist} fixlist="${fixlist}
sun_malloc" sun_malloc"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \
-e 's/int[ ][ ]*free/void free/g' \ -e 's/int[ ][ ]*free/void free/g' \
-e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \ -e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \
-e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' <&4 > ${DESTDIR}/$file. -e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sun_Memcpy fix #
# Fix 72: Sun_Memcpy
# #
case "$file" in ./memory.h ) 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`" if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' $file`"
...@@ -2065,10 +2073,8 @@ typedef __regmatch_t regmatch_t; ...@@ -2065,10 +2073,8 @@ typedef __regmatch_t regmatch_t;
fixlist="${fixlist} fixlist="${fixlist}
sun_memcpy" sun_memcpy"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
/* This file was generated by fixincludes */\ /* This file was generated by fixincludes */\
...@@ -2091,15 +2097,17 @@ extern int memcmp();\ ...@@ -2091,15 +2097,17 @@ extern int memcmp();\
\ \
#endif /* __memory_h__ */ #endif /* __memory_h__ */
' \ ' \
-e '1,$d' <&4 > ${DESTDIR}/$file. -e '1,$d' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Rusers_Semi fix #
# Fix 73: Sun_Rusers_Semi
# #
case "$file" in ./rpcsvc/rusers.h ) case "$file" in ./rpcsvc/rusers.h )
if ( test -n "`egrep '_cnt$' $file`" if ( test -n "`egrep '_cnt$' $file`"
...@@ -2107,20 +2115,20 @@ extern int memcmp();\ ...@@ -2107,20 +2115,20 @@ extern int memcmp();\
fixlist="${fixlist} fixlist="${fixlist}
sun_rusers_semi" sun_rusers_semi"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' <&4 > ${DESTDIR}/$file. sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Signal fix #
# Fix 74: Sun_Signal
# #
case "$file" in ./sys/signal.h | \ case "$file" in ./sys/signal.h | \
./signal.h ) ./signal.h )
...@@ -2129,10 +2137,8 @@ extern int memcmp();\ ...@@ -2129,10 +2137,8 @@ extern int memcmp();\
fixlist="${fixlist} fixlist="${fixlist}
sun_signal" sun_signal"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^void (\*signal())();$/i\ sed -e '/^void (\*signal())();$/i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -2141,62 +2147,64 @@ void (*signal(...))(...);\ ...@@ -2141,62 +2147,64 @@ void (*signal(...))(...);\
' \ ' \
-e '/^void (\*signal())();$/a\ -e '/^void (\*signal())();$/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sun_Xdr_Proto fix #
# Fix 75: Sun_Xdr_Proto
# #
case "$file" in ./rpc/xdr.h ) case "$file" in ./rpc/xdr.h )
fixlist="${fixlist} fixlist="${fixlist}
sun_xdr_proto" sun_xdr_proto"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^\(.*\)\*\(x_.*\)();\(.*\)/\ sed -e 's/^\(.*\)\*\(x_.*\)();\(.*\)/\
#ifdef __cplusplus\ #ifdef __cplusplus\
\1*\2(...);\3\ \1*\2(...);\3\
#else\ #else\
\1*\2();\3\ \1*\2();\3\
#endif/g' <&4 > ${DESTDIR}/$file. #endif/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sunos_Large_Macro fix #
# Fix 76: Sunos_Large_Macro
# #
case "$file" in ./sundev/ipi_error.h ) case "$file" in ./sundev/ipi_error.h )
fixlist="${fixlist} fixlist="${fixlist}
sunos_large_macro" sunos_large_macro"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
( echo "Removing incorrect fix to SunOS <sundev/ipi_error.h>" >&2 ( echo "Removing incorrect fix to SunOS <sundev/ipi_error.h>" >&2
rm -f ${DESTDIR}/$file ${DESTDIR}/$file. rm -f ${DESTDIR}/$file ${DESTDIR}/$file.
cat > /dev/null ) <&4 > ${DESTDIR}/$file. cat > /dev/null ) < $infile > ${DESTDIR}/$file.
exec 4<&-
# Shell scripts have the potential of removing the output # 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. if test ! -f ${DESTDIR}/$file.
then continue ; fi then continue ; fi
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sunos_Matherr_Decl fix #
# Fix 77: Sunos_Matherr_Decl
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
if ( test '(' "`fgrep 'struct exception' $file | line`" != 'struct exception {' ')' if ( test '(' "`fgrep 'struct exception' $file | line`" != 'struct exception {' ')'
...@@ -2204,40 +2212,40 @@ cat > /dev/null ) <&4 > ${DESTDIR}/$file. ...@@ -2204,40 +2212,40 @@ cat > /dev/null ) <&4 > ${DESTDIR}/$file.
fixlist="${fixlist} fixlist="${fixlist}
sunos_matherr_decl" sunos_matherr_decl"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/matherr/i\ sed -e '/matherr/i\
struct exception; struct exception;
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sunos_Strlen fix #
# Fix 78: Sunos_Strlen
# #
case "$file" in ./strings.h ) case "$file" in ./strings.h )
fixlist="${fixlist} fixlist="${fixlist}
sunos_strlen" sunos_strlen"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' <&4 > ${DESTDIR}/$file. sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Systypes fix #
# Fix 79: Systypes
# #
case "$file" in ./sys/types.h | \ case "$file" in ./sys/types.h | \
./stdlib.h | \ ./stdlib.h | \
...@@ -2250,10 +2258,8 @@ struct exception; ...@@ -2250,10 +2258,8 @@ struct exception;
fixlist="${fixlist} fixlist="${fixlist}
systypes" systypes"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^[ ]**[ ]*typedef unsigned int size_t;/N' \ sed -e '/^[ ]**[ ]*typedef unsigned int size_t;/N' \
-e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\ -e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\
...@@ -2283,15 +2289,17 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2283,15 +2289,17 @@ typedef __SIZE_TYPE__ size_t;\
-e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/a\ -e '/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/a\
#endif #endif
' \ ' \
-e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/typedef __WCHAR_TYPE__ wchar_t/' <&4 > ${DESTDIR}/$file. -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/typedef __WCHAR_TYPE__ wchar_t/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Systypes_For_Aix fix #
# Fix 80: Systypes_For_Aix
# #
case "$file" in ./sys/types.h ) case "$file" in ./sys/types.h )
if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' $file`" if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' $file`"
...@@ -2299,10 +2307,8 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2299,10 +2307,8 @@ typedef __SIZE_TYPE__ size_t;\
fixlist="${fixlist} fixlist="${fixlist}
systypes_for_aix" systypes_for_aix"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; 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\ #ifndef _GCC_SIZE_T\
...@@ -2310,24 +2316,24 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2310,24 +2316,24 @@ typedef __SIZE_TYPE__ 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 #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Sysv68_String fix #
# Fix 81: Sysv68_String
# #
case "$file" in ./string.h ) case "$file" in ./string.h )
fixlist="${fixlist} fixlist="${fixlist}
sysv68_string" sysv68_string"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/extern[ ]*int[ ]*strlen();/extern unsigned int strlen();/' \ sed -e 's/extern[ ]*int[ ]*strlen();/extern unsigned int strlen();/' \
-e 's/extern[ ]*int[ ]*ffs[ ]*(long);/extern int ffs(int);/' \ -e 's/extern[ ]*int[ ]*ffs[ ]*(long);/extern int ffs(int);/' \
...@@ -2339,23 +2345,25 @@ typedef __SIZE_TYPE__ size_t;\ ...@@ -2339,23 +2345,25 @@ typedef __SIZE_TYPE__ size_t;\
extern unsigned int\ extern unsigned int\
\2/' \ \2/' \
-e '/^extern int$/N' \ -e '/^extern int$/N' \
-e 's/^extern int\(\n strlen(),\)/extern size_t\1/' <&4 > ${DESTDIR}/$file. -e 's/^extern int\(\n strlen(),\)/extern size_t\1/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Sysz_Stdlib_For_Sun fix #
# Fix 82: Sysz_Stdlib_For_Sun
# #
case "$file" in ./stdlib.h ) case "$file" in ./stdlib.h )
case "$target_canonical" in *-sun-* | \
m88k-*-sysv3* )
fixlist="${fixlist} fixlist="${fixlist}
sysz_stdlib_for_sun" sysz_stdlib_for_sun"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/int abort/void abort/g' \ sed -e 's/int abort/void abort/g' \
-e 's/int free/void free/g' \ -e 's/int free/void free/g' \
...@@ -2369,23 +2377,25 @@ extern unsigned int\ ...@@ -2369,23 +2377,25 @@ extern unsigned int\
' \ ' \
-e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\ -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for machine type test
esac
;; # case end for file name test
esac esac
# Sysz_Stdtypes_For_Sun fix #
# Fix 83: Sysz_Stdtypes_For_Sun
# #
case "$file" in ./sys/stdtypes.h ) case "$file" in ./sys/stdtypes.h )
fixlist="${fixlist} fixlist="${fixlist}
sysz_stdtypes_for_sun" sysz_stdtypes_for_sun"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/[ ]size_t.*;/i\ sed -e '/[ ]size_t.*;/i\
#ifndef _GCC_SIZE_T\ #ifndef _GCC_SIZE_T\
...@@ -2407,32 +2417,34 @@ extern unsigned int\ ...@@ -2407,32 +2417,34 @@ extern unsigned int\
' \ ' \
-e '/[ ]wchar_t.*;/a\ -e '/[ ]wchar_t.*;/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Tinfo_Cplusplus fix #
# Fix 84: Tinfo_Cplusplus
# #
case "$file" in ./tinfo.h ) case "$file" in ./tinfo.h )
fixlist="${fixlist} fixlist="${fixlist}
tinfo_cplusplus" tinfo_cplusplus"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/[ ]_cplusplus/ __cplusplus/' <&4 > ${DESTDIR}/$file. sed -e 's/[ ]_cplusplus/ __cplusplus/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Ultrix_Ansi_Compat fix #
# Fix 85: Ultrix_Ansi_Compat
# #
case "$file" in ./ansi_compat.h ) case "$file" in ./ansi_compat.h )
if ( test -n "`egrep 'ULTRIX' $file`" if ( test -n "`egrep 'ULTRIX' $file`"
...@@ -2440,54 +2452,52 @@ extern unsigned int\ ...@@ -2440,54 +2452,52 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
ultrix_ansi_compat" ultrix_ansi_compat"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '1i\ sed -e '1i\
/* This file intentionally left blank. */ /* This file intentionally left blank. */
' \ ' \
-e '1,$d' <&4 > ${DESTDIR}/$file. -e '1,$d' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Ultrix_Atof_Param fix #
# Fix 86: Ultrix_Atof_Param
# #
case "$file" in ./math.h ) case "$file" in ./math.h )
fixlist="${fixlist} fixlist="${fixlist}
ultrix_atof_param" ultrix_atof_param"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ 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 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 double abs(double [a-z][a-z]*) {.*}@@' \
-e 's@inline int sqr(int [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. -e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Ultrix_Const fix #
# Fix 87: Ultrix_Const
# #
case "$file" in ./stdio.h ) case "$file" in ./stdio.h )
fixlist="${fixlist} fixlist="${fixlist}
ultrix_const" ultrix_const"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ sed -e 's@perror( char \*__s );@perror( const char *__s );@' \
-e 's@fputs( char \*__s,@fputs( const char *__s,@' \ -e 's@fputs( char \*__s,@fputs( const char *__s,@' \
...@@ -2497,14 +2507,16 @@ extern unsigned int\ ...@@ -2497,14 +2507,16 @@ extern unsigned int\
-e 's@scanf( char \*__format,@scanf( 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@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \
-e 's@popen(char \*, char \*);@popen(const char *, const char *);@' \ -e 's@popen(char \*, char \*);@popen(const char *, const char *);@' \
-e 's@tempnam(char\*,char\*);@tempnam(const char*,const char*);@' <&4 > ${DESTDIR}/$file. -e 's@tempnam(char\*,char\*);@tempnam(const char*,const char*);@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Ultrix_Ifdef fix #
# Fix 88: Ultrix_Ifdef
# #
case "$file" in ./sys/file.h ) case "$file" in ./sys/file.h )
if ( test -n "`egrep '#ifdef KERNEL' $file`" if ( test -n "`egrep '#ifdef KERNEL' $file`"
...@@ -2512,38 +2524,38 @@ extern unsigned int\ ...@@ -2512,38 +2524,38 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
ultrix_ifdef" ultrix_ifdef"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' <&4 > ${DESTDIR}/$file. sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Ultrix_Nested_Cmnt fix #
# Fix 89: Ultrix_Nested_Cmnt
# #
case "$file" in ./rpc/svc.h ) case "$file" in ./rpc/svc.h )
fixlist="${fixlist} fixlist="${fixlist}
ultrix_nested_cmnt" ultrix_nested_cmnt"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's@^\( \* int protocol; \)/\*@\1*/ /*@' <&4 > ${DESTDIR}/$file. sed -e 's@^\( \* int protocol; \)/\*@\1*/ /*@' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# Ultrix_Static fix #
# Fix 90: Ultrix_Static
# #
case "$file" in ./machine/cpu.h ) case "$file" in ./machine/cpu.h )
if ( test -n "`egrep '#include \"r[34]_cpu' $file`" if ( test -n "`egrep '#include \"r[34]_cpu' $file`"
...@@ -2551,22 +2563,22 @@ extern unsigned int\ ...@@ -2551,22 +2563,22 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
ultrix_static" ultrix_static"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \ sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \
-e 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/' \ -e 's/^#include "r3_cpu\.h"$/#include <machine\/r3_cpu\.h>/' \
-e 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.h>/' <&4 > ${DESTDIR}/$file. -e 's/^#include "r4_cpu\.h"$/#include <machine\/r4_cpu\.h>/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Undefine_Null fix #
# Fix 91: Undefine_Null
# #
if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \ if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \
-z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`" -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`"
...@@ -2574,21 +2586,20 @@ extern unsigned int\ ...@@ -2574,21 +2586,20 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
undefine_null" undefine_null"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/^#[ ]*define[ ][ ]*NULL[ ]/i\ sed -e '/^#[ ]*define[ ][ ]*NULL[ ]/i\
#undef NULL #undef NULL
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi fi # end of selection 'if'
# Va_I960_Macro fix #
# Fix 92: Va_I960_Macro
# #
case "$file" in ./arch/i960/archI960.h ) case "$file" in ./arch/i960/archI960.h )
if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`" if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`"
...@@ -2596,23 +2607,23 @@ extern unsigned int\ ...@@ -2596,23 +2607,23 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
va_i960_macro" va_i960_macro"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/__vsiz/__vxvsiz/' \ sed -e 's/__vsiz/__vxvsiz/' \
-e 's/__vali/__vxvali/' \ -e 's/__vali/__vxvali/' \
-e 's/__vpad/__vxvpad/' \ -e 's/__vpad/__vxvpad/' \
-e 's/__alignof__/__vxalignof__/' <&4 > ${DESTDIR}/$file. -e 's/__alignof__/__vxalignof__/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Void_Null fix #
# Fix 93: Void_Null
# #
case "$file" in ./curses.h | \ case "$file" in ./curses.h | \
./dbm.h | \ ./dbm.h | \
...@@ -2630,20 +2641,20 @@ extern unsigned int\ ...@@ -2630,20 +2641,20 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
void_null" void_null"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/^#[ ]*define[ ]*NULL[ ]*((void[ ]*\*)0)/#define NULL 0/' <&4 > ${DESTDIR}/$file. sed -e 's/^#[ ]*define[ ]*NULL[ ]*((void[ ]*\*)0)/#define NULL 0/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Vxworks_Gcc_Problem fix #
# Fix 94: Vxworks_Gcc_Problem
# #
case "$file" in ./types/vxTypesBase.h ) case "$file" in ./types/vxTypesBase.h )
if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`" if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`"
...@@ -2651,10 +2662,8 @@ extern unsigned int\ ...@@ -2651,10 +2662,8 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
vxworks_gcc_problem" vxworks_gcc_problem"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \ sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \
-e '/[ ]size_t/i\ -e '/[ ]size_t/i\
...@@ -2677,15 +2686,17 @@ extern unsigned int\ ...@@ -2677,15 +2686,17 @@ extern unsigned int\
' \ ' \
-e '/[ ]wchar_t/a\ -e '/[ ]wchar_t/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Vxworks_Needs_Vxtypes fix #
# Fix 95: Vxworks_Needs_Vxtypes
# #
case "$file" in ./time.h ) case "$file" in ./time.h )
if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`" if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`"
...@@ -2693,20 +2704,20 @@ extern unsigned int\ ...@@ -2693,20 +2704,20 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
vxworks_needs_vxtypes" vxworks_needs_vxtypes"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/uint_t/unsigned int/' <&4 > ${DESTDIR}/$file. sed -e 's/uint_t/unsigned int/' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Vxworks_Needs_Vxworks fix #
# Fix 96: Vxworks_Needs_Vxworks
# #
case "$file" in ./sys/stat.h ) case "$file" in ./sys/stat.h )
if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \ if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \
...@@ -2717,22 +2728,22 @@ extern unsigned int\ ...@@ -2717,22 +2728,22 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
vxworks_needs_vxworks" vxworks_needs_vxworks"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/#[ ]define[ ][ ]*__INCstath/a\ sed -e '/#[ ]define[ ][ ]*__INCstath/a\
#include <types/vxTypesOld.h> #include <types/vxTypesOld.h>
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# Vxworks_Time fix #
# Fix 97: Vxworks_Time
# #
case "$file" in ./time.h ) case "$file" in ./time.h )
if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \ if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \
...@@ -2741,10 +2752,8 @@ extern unsigned int\ ...@@ -2741,10 +2752,8 @@ extern unsigned int\
fixlist="${fixlist} fixlist="${fixlist}
vxworks_time" vxworks_time"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/VOIDFUNCPTR/i\ sed -e '/VOIDFUNCPTR/i\
#ifndef __gcc_VOIDFUNCPTR_defined\ #ifndef __gcc_VOIDFUNCPTR_defined\
...@@ -2756,15 +2765,17 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2756,15 +2765,17 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
#define __gcc_VOIDFUNCPTR_defined\ #define __gcc_VOIDFUNCPTR_defined\
#endif #endif
' \ ' \
-e 's/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g' <&4 > ${DESTDIR}/$file. -e 's/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# X11_Class fix #
# Fix 98: X11_Class
# #
case "$file" in ./X11/ShellP.h ) case "$file" in ./X11/ShellP.h )
if ( test -z "`egrep '__cplusplus' $file`" if ( test -z "`egrep '__cplusplus' $file`"
...@@ -2772,10 +2783,8 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2772,10 +2783,8 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
fixlist="${fixlist} fixlist="${fixlist}
x11_class" x11_class"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/char [*]class;/i\ sed -e '/char [*]class;/i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -2784,15 +2793,17 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2784,15 +2793,17 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
' \ ' \
-e '/char [*]class;/a\ -e '/char [*]class;/a\
#endif #endif
' <&4 > ${DESTDIR}/$file. ' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# X11_Class_Usage fix #
# Fix 99: X11_Class_Usage
# #
case "$file" in ./Xm/BaseClassI.h ) case "$file" in ./Xm/BaseClassI.h )
if ( test -z "`egrep '__cplusplus' $file`" if ( test -z "`egrep '__cplusplus' $file`"
...@@ -2800,20 +2811,20 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2800,20 +2811,20 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
fixlist="${fixlist} fixlist="${fixlist}
x11_class_usage" x11_class_usage"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's/ class[)]/ c_class)/g' <&4 > ${DESTDIR}/$file. sed -e 's/ class[)]/ c_class)/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# X11_New fix #
# Fix 100: X11_New
# #
case "$file" in ./Xm/Traversal.h ) case "$file" in ./Xm/Traversal.h )
if ( test -z "`egrep '__cplusplus' $file`" if ( test -z "`egrep '__cplusplus' $file`"
...@@ -2821,10 +2832,8 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2821,10 +2832,8 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
fixlist="${fixlist} fixlist="${fixlist}
x11_new" x11_new"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e '/Widget old, new;/i\ sed -e '/Widget old, new;/i\
#ifdef __cplusplus\ #ifdef __cplusplus\
...@@ -2834,33 +2843,33 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ ...@@ -2834,33 +2843,33 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\
-e '/Widget old, new;/a\ -e '/Widget old, new;/a\
#endif #endif
' \ ' \
-e 's/Widget new,/Widget c_new,/g' <&4 > ${DESTDIR}/$file. -e 's/Widget new,/Widget c_new,/g' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
fi ;; fi # end of selection 'if'
;; # case end for file name test
esac esac
# X11_Sprintf fix #
# Fix 101: X11_Sprintf
# #
case "$file" in ./X11*/Xmu.h ) case "$file" in ./X11*/Xmu.h )
fixlist="${fixlist} fixlist="${fixlist}
x11_sprintf" x11_sprintf"
if [ ! -r ${DESTDIR}/$file ] if [ ! -r ${DESTDIR}/$file ]
then exec 4< $file then infile=$file
else exec 4< ${DESTDIR}/$file ; fi else infile=${DESTDIR}/$file ; fi
if test $? -ne 0
then continue ; fi
sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\
extern char * sprintf();\ extern char * sprintf();\
#endif /* !defined __STDC__ */,' <&4 > ${DESTDIR}/$file. #endif /* !defined __STDC__ */,' \
exec 4<&- < $infile > ${DESTDIR}/$file.
mv -f ${DESTDIR}/$file. ${DESTDIR}/$file ;; mv -f ${DESTDIR}/$file. ${DESTDIR}/$file
;; # case end for file name test
esac esac
# IF the output has been removed OR it is unchanged, # IF the output has been removed OR it is unchanged,
# THEN ensure the output is gone # THEN ensure the output is gone
# ELSE look for local directory include syntax # ELSE look for local directory include syntax
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment