From 48bd9529118c7b04d1569ff5466e897d34cc6f88 Mon Sep 17 00:00:00 2001 From: Bruce Korb Date: Wed, 31 Mar 1999 12:05:26 +0000 Subject: [PATCH] regenerated From-SVN: r26088 --- gcc/fixinc/fixincl.sh | 263 ++--- gcc/fixinc/fixincl.x | 592 +++++------ gcc/fixinc/inclhack.sh | 2279 ++++++++++++++++++++-------------------- 3 files changed, 1522 insertions(+), 1612 deletions(-) diff --git a/gcc/fixinc/fixincl.sh b/gcc/fixinc/fixincl.sh index ce855898ec1..3b1aad3a21b 100755 --- a/gcc/fixinc/fixincl.sh +++ b/gcc/fixinc/fixincl.sh @@ -2,15 +2,15 @@ # # DO NOT EDIT THIS FILE (fixincl.sh) # -# It has been autogen-ed Wednesday March 31, 1999 at 01:12:08 AM MST -# From the definitions /puke/law//egcs/egcs/gcc/fixinc/inclhack.def -# and the template file /puke/law//egcs/egcs/gcc/fixinc/inclhack.tpl +# It has been autogen-ed Wednesday March 31, 1999 at 12:03:13 PM PST +# From the definitions inclhack.def +# and the template file inclhack.tpl # # Install modified versions of certain ANSI-incompatible system header # files which are fixed to work correctly with ANSI C and placed in a # directory that GNU C will search. # -# This script contains 105 fixup scripts. +# This script contains 103 fixup scripts. # # See README-fixinc for more information. # @@ -99,7 +99,7 @@ case $LIB in esac echo Fixing headers into ${LIB} for ${target_canonical} target - + # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then rm -f $LIB/ShouldNotExist @@ -110,7 +110,7 @@ elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then else LINKS=false fi - + # # # # # # # # # # # # # # # # # # # # # # # Search each input directory for broken header files. @@ -128,6 +128,7 @@ for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} cd ${INPUT} || continue +INPUT=`${PWDCMD}` # # # # # # # # # # # # # # # # # # # # # # @@ -135,24 +136,27 @@ cd ${INPUT} || continue echo Finding directories and links to directories # Find all directories and all symlinks that point to directories. -# Put the list in $files. +# Put the list in $all_dirs. # Each time we find a symlink, add it to newdirs # so that we do another find within the dir the link points to. -# Note that $files may have duplicates in it; +# Note that $all_dirs may have duplicates in it; # later parts of this file are supposed to ignore them. dirs="." levels=2 +all_dirs="" +search_dirs="" + while [ -n "$dirs" ] && [ $levels -gt 0 ] do - levels=`expr $levels - 1` - newdirs= - for d in $dirs - do + levels=`expr $levels - 1` + newdirs= + for d in $dirs + do echo " Searching $INPUT/$d" - + # Find all directories under $d, relative to $d, excluding $d itself. # (The /. is needed after $d in case $d is a symlink.) - files="$files `find $d/. -type d -print | \ + all_dirs="$all_dirs `find $d/. -type d -print | \ sed -e '/\/\.$/d' -e 's@/./@/@g'`" # Find all links to directories. # Using `-exec test -d' in find fails on some systems, @@ -164,131 +168,151 @@ do theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'` for d1 in $theselinks --dummy-- do - # If the link points to a directory, - # add that dir to $newdirs - if [ -d $d1 ] - then - files="$files $d1" + # If the link points to a directory, + # add that dir to $newdirs + if [ -d $d1 ] + then + all_dirs="$all_dirs $d1" if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ] then - newdirs="$newdirs $d1" - fi + newdirs="$newdirs $d1" + search_dirs="$search_dirs $d1" fi + fi done - done - - dirs="$newdirs" + done + + dirs="$newdirs" done - + # # # # # # # # # # # # # # # # # # # # # # dirs= echo "All directories (including links to directories):" -echo $files - -for file in $files; do +echo $all_dirs + +for file in $all_dirs; do rm -rf $LIB/$file if [ ! -d $LIB/$file ] then mkdir $LIB/$file fi done mkdir $LIB/root - + # # # # # # # # # # # # # # # # # # # # # # # treetops gets an alternating list # of old directories to copy # and the new directories to copy to. -treetops="${INPUT} ${LIB}" - +treetops=". ${LIB}" + if $LINKS; then echo 'Making symbolic directory links' - for file in $files; do - dest=`ls -ld $file | sed -n 's/.*-> //p'` - if [ "$dest" ]; then - cwd=`${PWDCMD}` - # In case $dest is relative, get to $file's dir first. - cd ${INPUT} - cd `echo ./$file | sed -n 's&[^/]*$&&p'` - # Check that the target directory exists. - # Redirections changed to avoid bug in sh on Ultrix. - (cd $dest) > /dev/null 2>&1 - if [ $? = 0 ]; then - cd $dest - # X gets the dir that the link actually leads to. - x=`${PWDCMD}` - # Canonicalize ${INPUT} now to minimize the time an - # automounter has to change the result of ${PWDCMD}. - cinput=`cd ${INPUT}; ${PWDCMD}` - # If a link points to ., make a similar link to . - if [ $x = ${cinput} ]; then - echo $file '->' . ': Making link' - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s . ${LIB}/$file > /dev/null 2>&1 - # If link leads back into ${INPUT}, - # make a similar link here. - elif expr $x : "${cinput}/.*" > /dev/null; then - # Y gets the actual target dir name, relative to ${INPUT}. - y=`echo $x | sed -n "s&${cinput}/&&p"` - # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. - dots=`echo "$file" | - sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` - echo $file '->' $dots$y ': Making link' - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s $dots$y ${LIB}/$file > /dev/null 2>&1 - else - # If the link is to a dir $target outside ${INPUT}, - # repoint the link at ${INPUT}/root$target - # and process $target into ${INPUT}/root$target - # treat this directory as if it actually contained the files. - echo $file '->' root$x ': Making link' - if [ -d $LIB/root$x ] - then true + cwd=`${PWDCMD}` + + for sym_link in $search_dirs; do + cd ${INPUT} + dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'` + + # In case $dest is relative, get to ${sym_link}'s dir first. + # + cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'` + + # Check that the target directory exists. + # Redirections changed to avoid bug in sh on Ultrix. + # + (cd $dest) > /dev/null 2>&1 + if [ $? = 0 ]; then + cd $dest + + # full_dest_dir gets the dir that the link actually leads to. + # + full_dest_dir=`${PWDCMD}` + + # Canonicalize ${INPUT} now to minimize the time an + # automounter has to change the result of ${PWDCMD}. + # + cinput=`cd ${INPUT}; ${PWDCMD}` + + # If a link points to ., make a similar link to . + # + if [ ${full_dest_dir} = ${cinput} ]; then + echo ${sym_link} '->' . ': Making self link' + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s . ${LIB}/${sym_link} > /dev/null 2>&1 + + # If link leads back into ${INPUT}, + # make a similar link here. + # + elif expr ${full_dest_dir} : "${cinput}/.*" > /dev/null; then + # Y gets the actual target dir name, relative to ${INPUT}. + y=`echo ${full_dest_dir} | sed -n "s&${cinput}/&&p"` + # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. + dots=`echo "${sym_link}" | + sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` + echo ${sym_link} '->' $dots$y ': Making local link' + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1 + else - dirname=root$x/ - dirmade=. - cd $LIB - while [ x$dirname != x ]; do - component=`echo $dirname | sed -e 's|/.*$||'` - mkdir $component >/dev/null 2>&1 - cd $component - dirmade=$dirmade/$component - dirname=`echo $dirname | sed -e 's|[^/]*/||'` - done - fi - # Duplicate directory structure created in ${LIB}/$file in new - # root area. - for file2 in $files; do - case $file2 in - $file/*) - dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` - echo "Duplicating ${file}'s ${dupdir}" - if [ -d ${dupdir} ] + # If the link is to a dir $target outside ${INPUT}, + # repoint the link at ${INPUT}/root$target + # and process $target into ${INPUT}/root$target + # treat this directory as if it actually contained the files. + # + echo ${sym_link} '->' root${full_dest_dir} ': Making rooted link' + if [ -d $LIB/root${full_dest_dir} ] then true else - mkdir ${dupdir} - fi - ;; - *) - ;; - esac + dirname=root${full_dest_dir}/ + dirmade=. + cd $LIB + while [ x$dirname != x ]; do + component=`echo $dirname | sed -e 's|/.*$||'` + mkdir $component >/dev/null 2>&1 + cd $component + dirmade=$dirmade/$component + dirname=`echo $dirname | sed -e 's|[^/]*/||'` done - # Get the path from ${LIB} to $file, accounting for symlinks. - parent=`echo "$file" | sed -e 's@/[^/]*$@@'` - libabs=`cd ${LIB}; ${PWDCMD}` - file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` - # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. - dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s ${dots}root$x ${LIB}/$file > /dev/null 2>&1 - treetops="$treetops $x ${LIB}/root$x" - fi + fi + + # Duplicate directory structure created in ${LIB}/${sym_link} in new + # root area. + # + for file2 in $all_dirs; do + case $file2 in + ${sym_link}/*) + dupdir=${LIB}/root${full_dest_dir}/`echo $file2 | + sed -n "s|^${sym_link}/||p"` + echo "Duplicating ${sym_link}'s ${dupdir}" + if [ -d ${dupdir} ] + then true + else + mkdir ${dupdir} + fi + ;; + *) + ;; + esac + done + + # Get the path from ${LIB} to ${sym_link}, accounting for symlinks. + # + parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` + libabs=`cd ${LIB}; ${PWDCMD}` + file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` + + # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. + # + dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1 + treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}" fi - cd $cwd fi done fi - + # # # # # # # # # # # # # # # # # # # # # # required= @@ -299,6 +323,9 @@ while [ $# != 0 ]; do # SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` export SRCDIR + + FIND_BASE=$1 + export FIND_BASE shift DESTDIR=`cd $1;${PWDCMD}` @@ -314,16 +341,16 @@ while [ $# != 0 ]; do touch ${DESTDIR}/DONE echo Fixing directory ${SRCDIR} into ${DESTDIR} - # Check .h files which are symlinks as well as those which are files. - # A link to a header file will not be processed by anything but this. + # Check files which are symlinks as well as those which are files. # - cd ${SRCDIR} - + cd ${INPUT} required="$required `if $LINKS; then - find . -name '*.h' \( -type f -o -type l \) -print + find ${FIND_BASE}/. \( -type f -o -type l \) -print else - find . -name '*.h' -type f -print - fi | ${FIXINCL}`" + find ${FIND_BASE}/. -type f -print + fi | \ + sed -e's;/\./;/;g' -e's;//*;/;g' | \ + ${FIXINCL}`" done ## Make sure that any include files referenced using double quotes @@ -368,8 +395,8 @@ find . -name DONE -exec rm -f '{}' ';' echo 'Removing unneeded directories:' cd $LIB -files=`find . -type d -print | sort -r` -for file in $files; do +all_dirs=`find . -type d -print | sort -r` +for file in $all_dirs; do rmdir $LIB/$file > /dev/null 2>&1 | : done diff --git a/gcc/fixinc/fixincl.x b/gcc/fixinc/fixincl.x index d03d3990e11..5aaa46e7227 100644 --- a/gcc/fixinc/fixincl.x +++ b/gcc/fixinc/fixincl.x @@ -1,15 +1,15 @@ /* * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been autogen-ed Wednesday March 31, 1999 at 01:11:59 AM MST - * From the definitions /puke/law//egcs/egcs/gcc/fixinc/inclhack.def - * and the template file /puke/law//egcs/egcs/gcc/fixinc/fixincl.tpl + * It has been autogen-ed Wednesday March 31, 1999 at 12:03:54 PM PST + * From the definitions inclhack.def + * and the template file fixincl.tpl * * Install modified versions of certain ANSI-incompatible system header * files which are fixed to work correctly with ANSI C and placed in a * directory that GNU C will search. * - * This script contains 105 fixup scripts. + * This script contains 103 fixup scripts. * * See README-fixinc for more information. * @@ -325,48 +325,7 @@ const char* apzAvoid_BoolPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 10 - Bad_Malloc_Decl fix - */ -tSCC zBad_Malloc_DeclName[] = - "Bad_Malloc_Decl"; -/* - * File name selection pattern - */ -tSCC zBad_Malloc_DeclList[] = - "|" "rpc/types.h" "|"; -/* - * Machine/OS name selection pattern - */ -#define apzBad_Malloc_DeclMachs (const char**)NULL - -/* - * content bypass pattern - */ -tSCC zBad_Malloc_DeclBypass0[] = - "\"C\""; - -#define BAD_MALLOC_DECL_TEST_CT 1 -tTestDesc aBad_Malloc_DeclTests[] = { - { TT_NEGREP, zBad_Malloc_DeclBypass0, (regex_t*)NULL }, }; - -/* - * Fix Command Arguments for Bad_Malloc_Decl - */ -const char* apzBad_Malloc_DeclPatch[] = { "sed", - "-e" "1i\\\n" - "#ifdef __cplusplus\\\n" - "extern \"C\" {\\\n" - "#endif\\\n" - "\n", - "-e" "$a\\\n" - "#ifdef __cplusplus\\\n" - "}\\\n" - "#endif\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description 11 - Bad_Struct_Term fix + * Description 10 - Bad_Struct_Term fix */ tSCC zBad_Struct_TermName[] = "Bad_Struct_Term"; @@ -399,7 +358,7 @@ const char* apzBad_Struct_TermPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 12 - Badquote fix + * Description 11 - Badquote fix */ tSCC zBadquoteName[] = "Badquote"; @@ -424,7 +383,7 @@ const char* apzBadquotePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 13 - Bad_Lval fix + * Description 12 - Bad_Lval fix */ tSCC zBad_LvalName[] = "Bad_Lval"; @@ -470,7 +429,7 @@ const char* apzBad_LvalPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 14 - Broken_Assert_Stdio fix + * Description 13 - Broken_Assert_Stdio fix */ tSCC zBroken_Assert_StdioName[] = "Broken_Assert_Stdio"; @@ -511,7 +470,7 @@ const char* apzBroken_Assert_StdioPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 15 - Broken_Assert_Stdlib fix + * Description 14 - Broken_Assert_Stdlib fix */ tSCC zBroken_Assert_StdlibName[] = "Broken_Assert_Stdlib"; @@ -554,7 +513,7 @@ const char* apzBroken_Assert_StdlibPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 16 - Bsd43_Io_Macros fix + * Description 15 - Bsd43_Io_Macros fix */ tSCC zBsd43_Io_MacrosName[] = "Bsd43_Io_Macros"; @@ -585,6 +544,34 @@ const char* apzBsd43_Io_MacrosPatch[] = { "sed", "-e" "/#[ \t]*define[ \t]*[ \t]BSD43__IO/s/'\\([cgx]\\)'/\\1/g", (char*)NULL }; +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description 16 - Dec_Intern_Asm fix + */ +tSCC zDec_Intern_AsmName[] = + "Dec_Intern_Asm"; +/* + * File name selection pattern + */ +tSCC zDec_Intern_AsmList[] = + "|" "c_asm.h" "|"; +/* + * Machine/OS name selection pattern + */ +#define apzDec_Intern_AsmMachs (const char**)NULL +#define DEC_INTERN_ASM_TEST_CT 0 +#define aDec_Intern_AsmTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Dec_Intern_Asm + */ +const char* apzDec_Intern_AsmPatch[] = { "sed", + "-e" "/^[ \t]*float[ \t]*fasm/i\n" + "#ifdef __DECC\n", + "-e" "/^[ \t]*#[ \t]*pragma[ \t]*intrinsic([ \t]*dasm/a\n" + "#endif\n", + (char*)NULL }; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * * Description 17 - No_Double_Slash fix @@ -604,13 +591,13 @@ tSCC zNo_Double_SlashName[] = * content selection pattern */ tSCC zNo_Double_SlashSelect0[] = - "//[^*]"; + "//[^\"*]"; /* * content test pattern. A shell will deal with it later. */ tSCC zNo_Double_SlashTest0[] = - "-z \"`echo ${file}|egrep '++$|\\.hh$|\\.H$'`\""; + "-z \"`echo ${file}|egrep 'cxx/|++$|\\.hh$|\\.H$'`\""; #define NO_DOUBLE_SLASH_TEST_CT 2 tTestDesc aNo_Double_SlashTests[] = { @@ -621,38 +608,12 @@ tTestDesc aNo_Double_SlashTests[] = { * Fix Command Arguments for No_Double_Slash */ const char* apzNo_Double_SlashPatch[] = { "sed", - "-e" "/\\/\\/[^*]/s|//.*$||g", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description 18 - Irix_Bogus_Cxx_Cmnt fix - */ -tSCC zIrix_Bogus_Cxx_CmntName[] = - "Irix_Bogus_Cxx_Cmnt"; -/* - * File name selection pattern - */ -tSCC zIrix_Bogus_Cxx_CmntList[] = - "|" "elf_abi.h" - "|" "elf.h" "|"; -/* - * Machine/OS name selection pattern - */ -#define apzIrix_Bogus_Cxx_CmntMachs (const char**)NULL -#define IRIX_BOGUS_CXX_CMNT_TEST_CT 0 -#define aIrix_Bogus_Cxx_CmntTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Irix_Bogus_Cxx_Cmnt - */ -const char* apzIrix_Bogus_Cxx_CmntPatch[] = { "sed", - "-e" "s@\"/\\*\"\\*/@\"//\"@", + "-e" "/\\/\\/[^\"*]/s|//.*$||g", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 19 - Ecd_Cursor fix + * Description 18 - Ecd_Cursor fix */ tSCC zEcd_CursorName[] = "Ecd_Cursor"; @@ -678,7 +639,7 @@ const char* apzEcd_CursorPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 20 - Else_Label fix + * Description 19 - Else_Label fix */ tSCC zElse_LabelName[] = "Else_Label"; @@ -716,7 +677,7 @@ const char* apzElse_LabelPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 21 - Endif_Label fix + * Description 20 - Endif_Label fix */ tSCC zEndif_LabelName[] = "Endif_Label"; @@ -755,7 +716,7 @@ const char* apzEndif_LabelPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 22 - Hp_Inline fix + * Description 21 - Hp_Inline fix */ tSCC zHp_InlineName[] = "Hp_Inline"; @@ -789,7 +750,7 @@ const char* apzHp_InlinePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 23 - Hp_Sysfile fix + * Description 22 - Hp_Sysfile fix */ tSCC zHp_SysfileName[] = "Hp_Sysfile"; @@ -822,34 +783,35 @@ const char* apzHp_SysfilePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 24 - Hpux_Cxx_Unready fix + * Description 23 - Cxx_Unready fix */ -tSCC zHpux_Cxx_UnreadyName[] = - "Hpux_Cxx_Unready"; +tSCC zCxx_UnreadyName[] = + "Cxx_Unready"; /* * File name selection pattern */ -tSCC zHpux_Cxx_UnreadyList[] = - "|" "sys/mman.h" "|"; +tSCC zCxx_UnreadyList[] = + "|" "sys/mman.h" + "|" "rpc/types.h" "|"; /* * Machine/OS name selection pattern */ -#define apzHpux_Cxx_UnreadyMachs (const char**)NULL +#define apzCxx_UnreadyMachs (const char**)NULL /* * content bypass pattern */ -tSCC zHpux_Cxx_UnreadyBypass0[] = +tSCC zCxx_UnreadyBypass0[] = "\"C\"|__BEGIN_DECLS"; -#define HPUX_CXX_UNREADY_TEST_CT 1 -tTestDesc aHpux_Cxx_UnreadyTests[] = { - { TT_NEGREP, zHpux_Cxx_UnreadyBypass0, (regex_t*)NULL }, }; +#define CXX_UNREADY_TEST_CT 1 +tTestDesc aCxx_UnreadyTests[] = { + { TT_NEGREP, zCxx_UnreadyBypass0, (regex_t*)NULL }, }; /* - * Fix Command Arguments for Hpux_Cxx_Unready + * Fix Command Arguments for Cxx_Unready */ -const char* apzHpux_Cxx_UnreadyPatch[] = { "sed", +const char* apzCxx_UnreadyPatch[] = { "sed", "-e" "1i\\\n" "#ifdef __cplusplus\\\n" "extern \"C\" {\\\n" @@ -863,7 +825,7 @@ const char* apzHpux_Cxx_UnreadyPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 25 - Hpux_Maxint fix + * Description 24 - Hpux_Maxint fix */ tSCC zHpux_MaxintName[] = "Hpux_Maxint"; @@ -891,7 +853,7 @@ const char* apzHpux_MaxintPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 26 - Hpux_Systime fix + * Description 25 - Hpux_Systime fix */ tSCC zHpux_SystimeName[] = "Hpux_Systime"; @@ -924,7 +886,7 @@ const char* apzHpux_SystimePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 27 - Interactv_Add1 fix + * Description 26 - Interactv_Add1 fix */ tSCC zInteractv_Add1Name[] = "Interactv_Add1"; @@ -947,9 +909,9 @@ tSCC zInteractv_Add1List[] = * content test pattern. A shell will deal with it later. */ tSCC zInteractv_Add1Test0[] = - "-d /etc/conf/kconfig.d"; + " -d /etc/conf/kconfig.d"; tSCC zInteractv_Add1Test1[] = - "-n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; + " -n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; #define INTERACTV_ADD1_TEST_CT 2 tTestDesc aInteractv_Add1Tests[] = { @@ -965,7 +927,7 @@ const char* apzInteractv_Add1Patch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 28 - Interactv_Add2 fix + * Description 27 - Interactv_Add2 fix */ tSCC zInteractv_Add2Name[] = "Interactv_Add2"; @@ -983,9 +945,9 @@ tSCC zInteractv_Add2List[] = * content test pattern. A shell will deal with it later. */ tSCC zInteractv_Add2Test0[] = - "-d /etc/conf/kconfig.d"; + " -d /etc/conf/kconfig.d"; tSCC zInteractv_Add2Test1[] = - "-n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; + " -n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; #define INTERACTV_ADD2_TEST_CT 2 tTestDesc aInteractv_Add2Tests[] = { @@ -1001,7 +963,7 @@ const char* apzInteractv_Add2Patch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 29 - Interactv_Add3 fix + * Description 28 - Interactv_Add3 fix */ tSCC zInteractv_Add3Name[] = "Interactv_Add3"; @@ -1019,9 +981,9 @@ tSCC zInteractv_Add3List[] = * content test pattern. A shell will deal with it later. */ tSCC zInteractv_Add3Test0[] = - "-d /etc/conf/kconfig.d"; + " -d /etc/conf/kconfig.d"; tSCC zInteractv_Add3Test1[] = - "-n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; + " -n \"`grep _POSIX_VERSION /usr/include/sys/unistd.h`\""; #define INTERACTV_ADD3_TEST_CT 2 tTestDesc aInteractv_Add3Tests[] = { @@ -1038,7 +1000,7 @@ const char* apzInteractv_Add3Patch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 30 - Io_Def_Quotes fix + * Description 29 - Io_Def_Quotes fix */ tSCC zIo_Def_QuotesName[] = "Io_Def_Quotes"; @@ -1055,7 +1017,7 @@ tSCC zIo_Def_QuotesName[] = * content selection pattern */ tSCC zIo_Def_QuotesSelect0[] = - "[ \t]_IO[A-Z]*[ \t]*\\([A-Za-z]"; + "[ \t](_|DES)IO[A-Z]*[ \t]*\\( *[^,']"; #define IO_DEF_QUOTES_TEST_CT 1 tTestDesc aIo_Def_QuotesTests[] = { @@ -1065,14 +1027,14 @@ tTestDesc aIo_Def_QuotesTests[] = { * Fix Command Arguments for Io_Def_Quotes */ const char* apzIo_Def_QuotesPatch[] = { "sed", - "-e" "s/\\([ \t]_IO[A-Z]*[ \t]*(\\)\\([A-Za-z]\\),/\\1'\\2',/", + "-e" "s/\\([ \t](_|DES)IO[A-Z]*[ \t]*(\\)\\([^,']\\),/\\1'\\2',/", "-e" "/#[ \t]*define[ \t]*[ \t]_IO/s/'\\([cgxtf]\\)'/\\1/g", "-e" "/#[ \t]*define[ \t]*[ \t]DESIOC/s/'\\([cdgx]\\)'/\\1/g", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 31 - Ioctl_Fix_Ctrl fix + * Description 30 - Ioctl_Fix_Ctrl fix */ tSCC zIoctl_Fix_CtrlName[] = "Ioctl_Fix_Ctrl"; @@ -1108,7 +1070,7 @@ const char* apzIoctl_Fix_CtrlPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 32 - Ip_Missing_Semi fix + * Description 31 - Ip_Missing_Semi fix */ tSCC zIp_Missing_SemiName[] = "Ip_Missing_Semi"; @@ -1133,7 +1095,7 @@ const char* apzIp_Missing_SemiPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 33 - Irix_Multiline_Cmnt fix + * Description 32 - Irix_Multiline_Cmnt fix */ tSCC zIrix_Multiline_CmntName[] = "Irix_Multiline_Cmnt"; @@ -1159,7 +1121,7 @@ const char* apzIrix_Multiline_CmntPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 34 - Irix_Sockaddr fix + * Description 33 - Irix_Sockaddr fix */ tSCC zIrix_SockaddrName[] = "Irix_Sockaddr"; @@ -1193,7 +1155,7 @@ const char* apzIrix_SockaddrPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 35 - Irix_Struct__File fix + * Description 34 - Irix_Struct__File fix */ tSCC zIrix_Struct__FileName[] = "Irix_Struct__File"; @@ -1219,7 +1181,7 @@ const char* apzIrix_Struct__FilePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 36 - Isc_Fmod fix + * Description 35 - Isc_Fmod fix */ tSCC zIsc_FmodName[] = "Isc_Fmod"; @@ -1252,7 +1214,7 @@ const char* apzIsc_FmodPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 37 - Motorola_Nested fix + * Description 36 - Motorola_Nested fix */ tSCC zMotorola_NestedName[] = "Motorola_Nested"; @@ -1265,7 +1227,9 @@ tSCC zMotorola_NestedList[] = /* * Machine/OS name selection pattern */ -#define apzMotorola_NestedMachs (const char**)NULL +tSCC* apzMotorola_NestedMachs[] = { + "m68k-motorola-sysv*", + (const char*)NULL }; #define MOTOROLA_NESTED_TEST_CT 0 #define aMotorola_NestedTests (tTestDesc*)NULL @@ -1279,7 +1243,7 @@ const char* apzMotorola_NestedPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 38 - Isc_Sys_Limits fix + * Description 37 - Isc_Sys_Limits fix */ tSCC zIsc_Sys_LimitsName[] = "Isc_Sys_Limits"; @@ -1313,7 +1277,7 @@ const char* apzIsc_Sys_LimitsPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 39 - Kandr_Concat fix + * Description 38 - Kandr_Concat fix */ tSCC zKandr_ConcatName[] = "Kandr_Concat"; @@ -1358,12 +1322,12 @@ tTestDesc aKandr_ConcatTests[] = { * Fix Command Arguments for Kandr_Concat */ const char* apzKandr_ConcatPatch[] = { "sed", - "-e" "s|/\\*\\*/| ## |g", + "-e" "s|/\\*\\*/|##|g", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 40 - Limits_Ifndefs fix + * Description 39 - Limits_Ifndefs fix */ tSCC zLimits_IfndefsName[] = "Limits_Ifndefs"; @@ -1420,7 +1384,7 @@ const char* apzLimits_IfndefsPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 41 - Lynx_Void_Int fix + * Description 40 - Lynx_Void_Int fix */ tSCC zLynx_Void_IntName[] = "Lynx_Void_Int"; @@ -1453,7 +1417,7 @@ const char* apzLynx_Void_IntPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 42 - Lynxos_Fcntl_Proto fix + * Description 41 - Lynxos_Fcntl_Proto fix */ tSCC zLynxos_Fcntl_ProtoName[] = "Lynxos_Fcntl_Proto"; @@ -1466,8 +1430,16 @@ tSCC zLynxos_Fcntl_ProtoList[] = * Machine/OS name selection pattern */ #define apzLynxos_Fcntl_ProtoMachs (const char**)NULL -#define LYNXOS_FCNTL_PROTO_TEST_CT 0 -#define aLynxos_Fcntl_ProtoTests (tTestDesc*)NULL + +/* + * content selection pattern + */ +tSCC zLynxos_Fcntl_ProtoSelect0[] = + "fcntl.*\\(int, int, int\\)"; + +#define LYNXOS_FCNTL_PROTO_TEST_CT 1 +tTestDesc aLynxos_Fcntl_ProtoTests[] = { + { TT_EGREP, zLynxos_Fcntl_ProtoSelect0, (regex_t*)NULL } }; /* * Fix Command Arguments for Lynxos_Fcntl_Proto @@ -1478,7 +1450,7 @@ const char* apzLynxos_Fcntl_ProtoPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 43 - M88k_Bad_Hypot_Opt fix + * Description 42 - M88k_Bad_Hypot_Opt fix */ tSCC zM88k_Bad_Hypot_OptName[] = "M88k_Bad_Hypot_Opt"; @@ -1518,7 +1490,7 @@ const char* apzM88k_Bad_Hypot_OptPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 44 - M88k_Bad_S_If fix + * Description 43 - M88k_Bad_S_If fix */ tSCC zM88k_Bad_S_IfName[] = "M88k_Bad_S_If"; @@ -1554,7 +1526,7 @@ const char* apzM88k_Bad_S_IfPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 45 - M88k_Multi_Incl fix + * Description 44 - M88k_Multi_Incl fix */ tSCC zM88k_Multi_InclName[] = "M88k_Multi_Incl"; @@ -1586,18 +1558,15 @@ tTestDesc aM88k_Multi_InclTests[] = { const char* apzM88k_Multi_InclPatch[] = { "sh", "-c", "echo Fixing $file, to protect against multiple inclusion. >&2\n" " cpp_wrapper=`echo $file | sed -e 's,\\.,_,g' -e 's,/,_,g'`\n" - " sed -e \"1i\\\n" - "#ifndef __GCC_GOT_${cpp_wrapper}_\\\n" - "#define __GCC_GOT_${cpp_wrapper}_\\\n" - "\" \\\n" - "\t-e \"$a\\\n" - "#endif /* ! __GCC_GOT_${cpp_wrapper}_ */\n" - "\"", + " echo \"#ifndef __GCC_GOT_${cpp_wrapper}_\"\n" + " echo \"#define __GCC_GOT_${cpp_wrapper}_\"\n" + " cat\n" + " echo \"#endif /* ! __GCC_GOT_${cpp_wrapper}_ */\"", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 46 - Machine_Name fix + * Description 45 - Machine_Name fix */ tSCC zMachine_NameName[] = "Machine_Name"; @@ -1663,7 +1632,7 @@ const char* apzMachine_NamePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 47 - Math_Exception fix + * Description 46 - Math_Exception fix */ tSCC zMath_ExceptionName[] = "Math_Exception"; @@ -1711,7 +1680,7 @@ const char* apzMath_ExceptionPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 48 - Math_Gcc_Ifndefs fix + * Description 47 - Math_Gcc_Ifndefs fix */ tSCC zMath_Gcc_IfndefsName[] = "Math_Gcc_Ifndefs"; @@ -1731,78 +1700,24 @@ tSCC zMath_Gcc_IfndefsList[] = * Fix Command Arguments for Math_Gcc_Ifndefs */ const char* apzMath_Gcc_IfndefsPatch[] = { "sh", "-c", - " dbl_max_def=\"`egrep 'define[ \t]+DBL_MAX[ \t]+.*' ${SRCDIR}/float.h 2>/dev/null`\"\n" + "\tdbl_max_def=`egrep 'define[ \t]+DBL_MAX[ \t]+.*' float.h 2>/dev/null`\n" "\n" "\tif ( test -n \"${dbl_max_def}\" \\\n" "\t\t-a -n \"`egrep '#define[ \t]*HUGE_VAL[ \t]+DBL_MAX' $file`\" \\\n" "\t\t-a -z \"`egrep '#define[ \t]+DBL_MAX[ \t]+' $file`\"\n" "\t ) > /dev/null 2>&1\n" - "\tthen sed -e '/define[ \t]HUGE_VAL[ \t]/i\\\n" - "#ifndef HUGE_VAL\n" - "' \\\n" - "\t-e '/define[ \t]HUGE_VAL[ \t]/a\\\n" - "#endif\n" - "'\\\n" - "\t-e \"/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/\"\n" - "\telse sed -e '/define[ \t]HUGE_VAL[ \t]/i\\\n" + "\tthen sed -e '/define[ \t]HUGE_VAL[ \t]DBL_MAX/s/DBL_MAX/$dbl_max_def/'\n" + "\telse cat ; fi |\n" + "\tsed -e'/define[ \t]HUGE_VAL[ \t]/i\\\n" "#ifndef HUGE_VAL\n" - "' \\\n" - "\t-e '/define[ \t]HUGE_VAL[ \t]/a\\\n" + "' -e'/define[ \t]HUGE_VAL[ \t]/a\\\n" "#endif\n" - "'\n" - "\tfi", + "'", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 49 - Motorola_Stupid_Opt fix - */ -tSCC zMotorola_Stupid_OptName[] = - "Motorola_Stupid_Opt"; -/* - * File name selection pattern - */ -tSCC zMotorola_Stupid_OptList[] = - "|" "math.h" "|"; -/* - * Machine/OS name selection pattern - */ -tSCC* apzMotorola_Stupid_OptMachs[] = { - "m88k-motorola-sysv3*", - (const char*)NULL }; - -/* - * content selection pattern - */ -tSCC zMotorola_Stupid_OptSelect0[] = - "^extern double hypot();$"; - -#define MOTOROLA_STUPID_OPT_TEST_CT 1 -tTestDesc aMotorola_Stupid_OptTests[] = { - { TT_EGREP, zMotorola_Stupid_OptSelect0, (regex_t*)NULL } }; - -/* - * Fix Command Arguments for Motorola_Stupid_Opt - */ -const char* apzMotorola_Stupid_OptPatch[] = { "sed", - "-e" "/^extern double hypot();$/a\\\n" - "\\/* Workaround a stupid Motorola optimization if one\\\n" - " of x or y is 0.0 and the other is negative! *\\/\\\n" - "#ifdef __STDC__\\\n" - "static __inline__ double fake_hypot (double x, double y)\\\n" - "#else\\\n" - "static __inline__ double fake_hypot (x, y)\\\n" - "\tdouble x, y;\\\n" - "#endif\\\n" - "{\\\n" - "\treturn fabs (hypot (x, y));\\\n" - "}\\\n" - "#define hypot\tfake_hypot\n", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description 50 - Nested_Comment fix + * Description 48 - Nested_Comment fix */ tSCC zNested_CommentName[] = "Nested_Comment"; @@ -1827,7 +1742,7 @@ const char* apzNested_CommentPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 51 - News_Os_Recursion fix + * Description 49 - News_Os_Recursion fix */ tSCC zNews_Os_RecursionName[] = "News_Os_Recursion"; @@ -1863,7 +1778,7 @@ const char* apzNews_Os_RecursionPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 52 - Next_Math_Prefix fix + * Description 50 - Next_Math_Prefix fix */ tSCC zNext_Math_PrefixName[] = "Next_Math_Prefix"; @@ -1900,7 +1815,7 @@ const char* apzNext_Math_PrefixPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 53 - Next_Template fix + * Description 51 - Next_Template fix */ tSCC zNext_TemplateName[] = "Next_Template"; @@ -1934,7 +1849,7 @@ const char* apzNext_TemplatePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 54 - Next_Volitile fix + * Description 52 - Next_Volitile fix */ tSCC zNext_VolitileName[] = "Next_Volitile"; @@ -1968,7 +1883,7 @@ const char* apzNext_VolitilePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 55 - Next_Wait_Union fix + * Description 53 - Next_Wait_Union fix */ tSCC zNext_Wait_UnionName[] = "Next_Wait_Union"; @@ -2001,7 +1916,7 @@ const char* apzNext_Wait_UnionPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 56 - Nodeent_Syntax fix + * Description 54 - Nodeent_Syntax fix */ tSCC zNodeent_SyntaxName[] = "Nodeent_Syntax"; @@ -2026,7 +1941,7 @@ const char* apzNodeent_SyntaxPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 57 - Osf_Namespace_A fix + * Description 55 - Osf_Namespace_A fix */ tSCC zOsf_Namespace_AName[] = "Osf_Namespace_A"; @@ -2045,11 +1960,20 @@ tSCC zOsf_Namespace_AList[] = * content test pattern. A shell will deal with it later. */ tSCC zOsf_Namespace_ATest0[] = - "-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`\""; - -#define OSF_NAMESPACE_A_TEST_CT 1 + " -r reg_types.h"; +tSCC zOsf_Namespace_ATest1[] = + " -r sys/lc_core.h"; +tSCC zOsf_Namespace_ATest2[] = + " -n \"`grep '} regex_t;' reg_types.h`\""; +tSCC zOsf_Namespace_ATest3[] = + " -z \"`grep __regex_t regex.h`\""; + +#define OSF_NAMESPACE_A_TEST_CT 4 tTestDesc aOsf_Namespace_ATests[] = { - { TT_TEST, zOsf_Namespace_ATest0, 0 /* unused */ }, }; + { TT_TEST, zOsf_Namespace_ATest0, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_ATest1, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_ATest2, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_ATest3, 0 /* unused */ }, }; /* * Fix Command Arguments for Osf_Namespace_A @@ -2062,7 +1986,7 @@ const char* apzOsf_Namespace_APatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 58 - Osf_Namespace_B fix + * Description 56 - Osf_Namespace_B fix */ tSCC zOsf_Namespace_BName[] = "Osf_Namespace_B"; @@ -2080,11 +2004,20 @@ tSCC zOsf_Namespace_BList[] = * content test pattern. A shell will deal with it later. */ tSCC zOsf_Namespace_BTest0[] = - "-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`\""; - -#define OSF_NAMESPACE_B_TEST_CT 1 + " -r reg_types.h"; +tSCC zOsf_Namespace_BTest1[] = + " -r sys/lc_core.h"; +tSCC zOsf_Namespace_BTest2[] = + " -n \"`grep '} regex_t;' reg_types.h`\""; +tSCC zOsf_Namespace_BTest3[] = + " -z \"`grep __regex_t regex.h`\""; + +#define OSF_NAMESPACE_B_TEST_CT 4 tTestDesc aOsf_Namespace_BTests[] = { - { TT_TEST, zOsf_Namespace_BTest0, 0 /* unused */ }, }; + { TT_TEST, zOsf_Namespace_BTest0, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_BTest1, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_BTest2, 0 /* unused */ }, + { TT_TEST, zOsf_Namespace_BTest3, 0 /* unused */ }, }; /* * Fix Command Arguments for Osf_Namespace_B @@ -2098,7 +2031,7 @@ const char* apzOsf_Namespace_BPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 59 - Pthread_Page_Size fix + * Description 57 - Pthread_Page_Size fix */ tSCC zPthread_Page_SizeName[] = "Pthread_Page_Size"; @@ -2131,7 +2064,7 @@ const char* apzPthread_Page_SizePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 60 - Rs6000_Double fix + * Description 58 - Rs6000_Double fix */ tSCC zRs6000_DoubleName[] = "Rs6000_Double"; @@ -2167,7 +2100,7 @@ const char* apzRs6000_DoublePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 61 - Rs6000_Fchmod fix + * Description 59 - Rs6000_Fchmod fix */ tSCC zRs6000_FchmodName[] = "Rs6000_Fchmod"; @@ -2200,7 +2133,7 @@ const char* apzRs6000_FchmodPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 62 - Rs6000_Param fix + * Description 60 - Rs6000_Param fix */ tSCC zRs6000_ParamName[] = "Rs6000_Param"; @@ -2226,7 +2159,7 @@ const char* apzRs6000_ParamPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 63 - Sony_Include fix + * Description 61 - Sony_Include fix */ tSCC zSony_IncludeName[] = "Sony_Include"; @@ -2259,7 +2192,7 @@ const char* apzSony_IncludePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 64 - Statsswtch fix + * Description 62 - Statsswtch fix */ tSCC zStatsswtchName[] = "Statsswtch"; @@ -2292,7 +2225,7 @@ const char* apzStatsswtchPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 65 - Stdio_Va_List fix + * Description 63 - Stdio_Va_List fix */ tSCC zStdio_Va_ListName[] = "Stdio_Va_List"; @@ -2334,7 +2267,7 @@ const char* apzStdio_Va_ListPatch[] = { "sh", "-c", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 66 - Sun_Bogus_Ifdef fix + * Description 64 - Sun_Bogus_Ifdef fix */ tSCC zSun_Bogus_IfdefName[] = "Sun_Bogus_Ifdef"; @@ -2368,7 +2301,7 @@ const char* apzSun_Bogus_IfdefPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 67 - Sun_Bogus_Ifdef_Sun4c fix + * Description 65 - Sun_Bogus_Ifdef_Sun4c fix */ tSCC zSun_Bogus_Ifdef_Sun4cName[] = "Sun_Bogus_Ifdef_Sun4c"; @@ -2401,7 +2334,7 @@ const char* apzSun_Bogus_Ifdef_Sun4cPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 68 - Sun_Catmacro fix + * Description 66 - Sun_Catmacro fix */ tSCC zSun_CatmacroName[] = "Sun_Catmacro"; @@ -2439,7 +2372,7 @@ const char* apzSun_CatmacroPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 69 - Sun_Malloc fix + * Description 67 - Sun_Malloc fix */ tSCC zSun_MallocName[] = "Sun_Malloc"; @@ -2467,7 +2400,7 @@ const char* apzSun_MallocPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 70 - Sun_Memcpy fix + * Description 68 - Sun_Memcpy fix */ tSCC zSun_MemcpyName[] = "Sun_Memcpy"; @@ -2520,7 +2453,7 @@ const char* apzSun_MemcpyPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 71 - Sun_Rusers_Semi fix + * Description 69 - Sun_Rusers_Semi fix */ tSCC zSun_Rusers_SemiName[] = "Sun_Rusers_Semi"; @@ -2553,7 +2486,7 @@ const char* apzSun_Rusers_SemiPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 72 - Sun_Signal fix + * Description 70 - Sun_Signal fix */ tSCC zSun_SignalName[] = "Sun_Signal"; @@ -2592,7 +2525,7 @@ const char* apzSun_SignalPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 73 - Sun_Auth_Proto fix + * Description 71 - Sun_Auth_Proto fix */ tSCC zSun_Auth_ProtoName[] = "Sun_Auth_Proto"; @@ -2642,34 +2575,7 @@ const char* apzSun_Auth_ProtoPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 74 - Sunos_Large_Macro fix - */ -tSCC zSunos_Large_MacroName[] = - "Sunos_Large_Macro"; -/* - * File name selection pattern - */ -tSCC zSunos_Large_MacroList[] = - "|" "sundev/ipi_error.h" "|"; -/* - * Machine/OS name selection pattern - */ -#define apzSunos_Large_MacroMachs (const char**)NULL -#define SUNOS_LARGE_MACRO_TEST_CT 0 -#define aSunos_Large_MacroTests (tTestDesc*)NULL - -/* - * Fix Command Arguments for Sunos_Large_Macro - */ -const char* apzSunos_Large_MacroPatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to SunOS \" >&2\n" - "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" - "cat > /dev/null", - (char*)NULL }; - -/* * * * * * * * * * * * * * * * * * * * * * * * * * - * - * Description 75 - Sunos_Matherr_Decl fix + * Description 72 - Sunos_Matherr_Decl fix */ tSCC zSunos_Matherr_DeclName[] = "Sunos_Matherr_Decl"; @@ -2682,28 +2588,21 @@ tSCC zSunos_Matherr_DeclList[] = * Machine/OS name selection pattern */ #define apzSunos_Matherr_DeclMachs (const char**)NULL - -/* - * content test pattern. A shell will deal with it later. - */ -tSCC zSunos_Matherr_DeclTest0[] = - "\"`fgrep 'struct exception' $file | line`\" != 'struct exception {'"; - -#define SUNOS_MATHERR_DECL_TEST_CT 1 -tTestDesc aSunos_Matherr_DeclTests[] = { - { TT_TEST, zSunos_Matherr_DeclTest0, 0 /* unused */ }, }; +#define SUNOS_MATHERR_DECL_TEST_CT 0 +#define aSunos_Matherr_DeclTests (tTestDesc*)NULL /* * Fix Command Arguments for Sunos_Matherr_Decl */ const char* apzSunos_Matherr_DeclPatch[] = { "sed", + "-e" "/^struct exception/,$b", "-e" "/matherr/i\\\n" "struct exception;\n", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 76 - Sunos_Strlen fix + * Description 73 - Sunos_Strlen fix */ tSCC zSunos_StrlenName[] = "Sunos_Strlen"; @@ -2728,7 +2627,7 @@ const char* apzSunos_StrlenPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 77 - Systypes fix + * Description 74 - Systypes fix */ tSCC zSystypesName[] = "Systypes"; @@ -2790,7 +2689,7 @@ const char* apzSystypesPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 78 - Systypes_For_Aix fix + * Description 75 - Systypes_For_Aix fix */ tSCC zSystypes_For_AixName[] = "Systypes_For_Aix"; @@ -2834,7 +2733,7 @@ const char* apzSystypes_For_AixPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 79 - Sysv68_String fix + * Description 76 - Sysv68_String fix */ tSCC zSysv68_StringName[] = "Sysv68_String"; @@ -2869,7 +2768,7 @@ const char* apzSysv68_StringPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 80 - Sysz_Stdlib_For_Sun fix + * Description 77 - Sysz_Stdlib_For_Sun fix */ tSCC zSysz_Stdlib_For_SunName[] = "Sysz_Stdlib_For_Sun"; @@ -2882,8 +2781,8 @@ tSCC zSysz_Stdlib_For_SunList[] = * Machine/OS name selection pattern */ tSCC* apzSysz_Stdlib_For_SunMachs[] = { - "*-sun-*", - "m88k-*-sysv3*", + "*-sun*", + "m88k-*sysv3*", (const char*)NULL }; #define SYSZ_STDLIB_FOR_SUN_TEST_CT 0 #define aSysz_Stdlib_For_SunTests (tTestDesc*)NULL @@ -2907,7 +2806,7 @@ const char* apzSysz_Stdlib_For_SunPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 81 - Sysz_Stdtypes_For_Sun fix + * Description 78 - Sysz_Stdtypes_For_Sun fix */ tSCC zSysz_Stdtypes_For_SunName[] = "Sysz_Stdtypes_For_Sun"; @@ -2946,7 +2845,7 @@ const char* apzSysz_Stdtypes_For_SunPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 82 - Tinfo_Cplusplus fix + * Description 79 - Tinfo_Cplusplus fix */ tSCC zTinfo_CplusplusName[] = "Tinfo_Cplusplus"; @@ -2971,7 +2870,7 @@ const char* apzTinfo_CplusplusPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 83 - Ultrix_Ansi_Compat fix + * Description 80 - Ultrix_Ansi_Compat fix */ tSCC zUltrix_Ansi_CompatName[] = "Ultrix_Ansi_Compat"; @@ -3006,7 +2905,7 @@ const char* apzUltrix_Ansi_CompatPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 84 - Ultrix_Fix_Fixproto fix + * Description 81 - Ultrix_Fix_Fixproto fix */ tSCC zUltrix_Fix_FixprotoName[] = "Ultrix_Fix_Fixproto"; @@ -3040,7 +2939,7 @@ const char* apzUltrix_Fix_FixprotoPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 85 - Ultrix_Atof_Param fix + * Description 82 - Ultrix_Atof_Param fix */ tSCC zUltrix_Atof_ParamName[] = "Ultrix_Atof_Param"; @@ -3069,7 +2968,7 @@ const char* apzUltrix_Atof_ParamPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 86 - Ultrix_Const fix + * Description 83 - Ultrix_Const fix */ tSCC zUltrix_ConstName[] = "Ultrix_Const"; @@ -3102,7 +3001,7 @@ const char* apzUltrix_ConstPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 87 - Ultrix_Ifdef fix + * Description 84 - Ultrix_Ifdef fix */ tSCC zUltrix_IfdefName[] = "Ultrix_Ifdef"; @@ -3135,7 +3034,7 @@ const char* apzUltrix_IfdefPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 88 - Ultrix_Nested_Cmnt fix + * Description 85 - Ultrix_Nested_Cmnt fix */ tSCC zUltrix_Nested_CmntName[] = "Ultrix_Nested_Cmnt"; @@ -3160,7 +3059,7 @@ const char* apzUltrix_Nested_CmntPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 89 - Ultrix_Static fix + * Description 86 - Ultrix_Static fix */ tSCC zUltrix_StaticName[] = "Ultrix_Static"; @@ -3195,7 +3094,7 @@ const char* apzUltrix_StaticPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 90 - Undefine_Null fix + * Description 87 - Undefine_Null fix */ tSCC zUndefine_NullName[] = "Undefine_Null"; @@ -3235,7 +3134,7 @@ const char* apzUndefine_NullPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 91 - Va_I960_Macro fix + * Description 88 - Va_I960_Macro fix */ tSCC zVa_I960_MacroName[] = "Va_I960_Macro"; @@ -3271,7 +3170,7 @@ const char* apzVa_I960_MacroPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 92 - Void_Null fix + * Description 89 - Void_Null fix */ tSCC zVoid_NullName[] = "Void_Null"; @@ -3314,7 +3213,7 @@ const char* apzVoid_NullPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 93 - Vxworks_Gcc_Problem fix + * Description 90 - Vxworks_Gcc_Problem fix */ tSCC zVxworks_Gcc_ProblemName[] = "Vxworks_Gcc_Problem"; @@ -3362,7 +3261,7 @@ const char* apzVxworks_Gcc_ProblemPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 94 - Vxworks_Needs_Vxtypes fix + * Description 91 - Vxworks_Needs_Vxtypes fix */ tSCC zVxworks_Needs_VxtypesName[] = "Vxworks_Needs_Vxtypes"; @@ -3395,7 +3294,7 @@ const char* apzVxworks_Needs_VxtypesPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 95 - Vxworks_Needs_Vxworks fix + * Description 92 - Vxworks_Needs_Vxworks fix */ tSCC zVxworks_Needs_VxworksName[] = "Vxworks_Needs_Vxworks"; @@ -3419,11 +3318,11 @@ tSCC zVxworks_Needs_VxworksSelect0[] = * content test pattern. A shell will deal with it later. */ tSCC zVxworks_Needs_VxworksTest0[] = - "-r types/vxTypesOld.h"; + " -r types/vxTypesOld.h"; tSCC zVxworks_Needs_VxworksTest1[] = - "-n \"`fgrep '#include' $file`\""; + " -n \"`egrep '#include' $file`\""; tSCC zVxworks_Needs_VxworksTest2[] = - "-n \"`fgrep ULONG $file`\""; + " -n \"`egrep ULONG $file`\""; #define VXWORKS_NEEDS_VXWORKS_TEST_CT 4 tTestDesc aVxworks_Needs_VxworksTests[] = { @@ -3442,7 +3341,7 @@ const char* apzVxworks_Needs_VxworksPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 96 - Vxworks_Time fix + * Description 93 - Vxworks_Time fix */ tSCC zVxworks_TimeName[] = "Vxworks_Time"; @@ -3466,7 +3365,7 @@ tSCC zVxworks_TimeSelect0[] = * content test pattern. A shell will deal with it later. */ tSCC zVxworks_TimeTest0[] = - "-r vxWorks.h"; + " -r vxWorks.h"; #define VXWORKS_TIME_TEST_CT 2 tTestDesc aVxworks_TimeTests[] = { @@ -3491,7 +3390,7 @@ const char* apzVxworks_TimePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 97 - X11_Class fix + * Description 94 - X11_Class fix */ tSCC zX11_ClassName[] = "X11_Class"; @@ -3529,7 +3428,7 @@ const char* apzX11_ClassPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 98 - X11_Class_Usage fix + * Description 95 - X11_Class_Usage fix */ tSCC zX11_Class_UsageName[] = "X11_Class_Usage"; @@ -3562,7 +3461,7 @@ const char* apzX11_Class_UsagePatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 99 - X11_New fix + * Description 96 - X11_New fix */ tSCC zX11_NewName[] = "X11_New"; @@ -3601,7 +3500,7 @@ const char* apzX11_NewPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 100 - X11_Sprintf fix + * Description 97 - X11_Sprintf fix */ tSCC zX11_SprintfName[] = "X11_Sprintf"; @@ -3628,7 +3527,7 @@ const char* apzX11_SprintfPatch[] = { "sed", /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 101 - Zzz_Ki_Iface fix + * Description 98 - Zzz_Ki_Iface fix */ tSCC zZzz_Ki_IfaceName[] = "Zzz_Ki_Iface"; @@ -3656,14 +3555,14 @@ tTestDesc aZzz_Ki_IfaceTests[] = { * Fix Command Arguments for Zzz_Ki_Iface */ const char* apzZzz_Ki_IfacePatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to HP-UX <$file>\" >&2\n" + "echo \"Removing incorrect fix to <$file>\" >&2\n" "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" "cat > /dev/null", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 102 - Zzz_Ki fix + * Description 99 - Zzz_Ki fix */ tSCC zZzz_KiName[] = "Zzz_Ki"; @@ -3691,14 +3590,14 @@ tTestDesc aZzz_KiTests[] = { * Fix Command Arguments for Zzz_Ki */ const char* apzZzz_KiPatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to HP-UX <$file>\" >&2\n" + "echo \"Removing incorrect fix to <$file>\" >&2\n" "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" "cat > /dev/null", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 103 - Zzz_Ki_Calls fix + * Description 100 - Zzz_Ki_Calls fix */ tSCC zZzz_Ki_CallsName[] = "Zzz_Ki_Calls"; @@ -3726,14 +3625,14 @@ tTestDesc aZzz_Ki_CallsTests[] = { * Fix Command Arguments for Zzz_Ki_Calls */ const char* apzZzz_Ki_CallsPatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to HP-UX <$file>\" >&2\n" + "echo \"Removing incorrect fix to <$file>\" >&2\n" "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" "cat > /dev/null", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 104 - Zzz_Ki_Defs fix + * Description 101 - Zzz_Ki_Defs fix */ tSCC zZzz_Ki_DefsName[] = "Zzz_Ki_Defs"; @@ -3761,14 +3660,41 @@ tTestDesc aZzz_Ki_DefsTests[] = { * Fix Command Arguments for Zzz_Ki_Defs */ const char* apzZzz_Ki_DefsPatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to HP-UX <$file>\" >&2\n" + "echo \"Removing incorrect fix to <$file>\" >&2\n" "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" "cat > /dev/null", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * * - * Description 105 - Zzz_Time fix + * Description 102 - Zzz_Bad_Fixes fix + */ +tSCC zZzz_Bad_FixesName[] = + "Zzz_Bad_Fixes"; +/* + * File name selection pattern + */ +tSCC zZzz_Bad_FixesList[] = + "|" "sundev/ipi_error.h" "|"; +/* + * Machine/OS name selection pattern + */ +#define apzZzz_Bad_FixesMachs (const char**)NULL +#define ZZZ_BAD_FIXES_TEST_CT 0 +#define aZzz_Bad_FixesTests (tTestDesc*)NULL + +/* + * Fix Command Arguments for Zzz_Bad_Fixes + */ +const char* apzZzz_Bad_FixesPatch[] = { "sh", "-c", + "echo \"Removing incorrect fix to <$file>\" >&2\n" + "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" + "cat > /dev/null", + (char*)NULL }; + +/* * * * * * * * * * * * * * * * * * * * * * * * * * + * + * Description 103 - Zzz_Time fix */ tSCC zZzz_TimeName[] = "Zzz_Time"; @@ -3796,7 +3722,7 @@ tTestDesc aZzz_TimeTests[] = { * Fix Command Arguments for Zzz_Time */ const char* apzZzz_TimePatch[] = { "sh", "-c", - "echo \"Removing incorrect fix to HP-UX <$file>\" >&2\n" + "echo \"Removing incorrect fix to <$file>\" >&2\n" "rm -f ${DESTDIR}/$file ${DESTDIR}/$file.\n" "cat > /dev/null", (char*)NULL }; @@ -3805,9 +3731,9 @@ const char* apzZzz_TimePatch[] = { "sh", "-c", * * List of all fixes */ -#define REGEX_COUNT 76 -#define FIX_COUNT 105 -tFixDesc fixDescList[ 105 ] = { +#define REGEX_COUNT 75 +#define FIX_COUNT 103 +tFixDesc fixDescList[ 103 ] = { { zAix_SyswaitName, zAix_SyswaitList, apzAix_SyswaitMachs, (regex_t*)NULL, AIX_SYSWAIT_TEST_CT, FD_MACH_ONLY, @@ -3853,11 +3779,6 @@ tFixDesc fixDescList[ 105 ] = { AVOID_BOOL_TEST_CT, FD_MACH_ONLY, aAvoid_BoolTests, apzAvoid_BoolPatch }, - { zBad_Malloc_DeclName, zBad_Malloc_DeclList, - apzBad_Malloc_DeclMachs, (regex_t*)NULL, - BAD_MALLOC_DECL_TEST_CT, FD_MACH_ONLY, - aBad_Malloc_DeclTests, apzBad_Malloc_DeclPatch }, - { zBad_Struct_TermName, zBad_Struct_TermList, apzBad_Struct_TermMachs, (regex_t*)NULL, BAD_STRUCT_TERM_TEST_CT, FD_MACH_ONLY, @@ -3888,16 +3809,16 @@ tFixDesc fixDescList[ 105 ] = { BSD43_IO_MACROS_TEST_CT, FD_MACH_ONLY, aBsd43_Io_MacrosTests, apzBsd43_Io_MacrosPatch }, + { zDec_Intern_AsmName, zDec_Intern_AsmList, + apzDec_Intern_AsmMachs, (regex_t*)NULL, + DEC_INTERN_ASM_TEST_CT, FD_MACH_ONLY, + aDec_Intern_AsmTests, apzDec_Intern_AsmPatch }, + { zNo_Double_SlashName, zNo_Double_SlashList, apzNo_Double_SlashMachs, (regex_t*)NULL, NO_DOUBLE_SLASH_TEST_CT, FD_MACH_ONLY, aNo_Double_SlashTests, apzNo_Double_SlashPatch }, - { zIrix_Bogus_Cxx_CmntName, zIrix_Bogus_Cxx_CmntList, - apzIrix_Bogus_Cxx_CmntMachs, (regex_t*)NULL, - IRIX_BOGUS_CXX_CMNT_TEST_CT, FD_MACH_ONLY, - aIrix_Bogus_Cxx_CmntTests, apzIrix_Bogus_Cxx_CmntPatch }, - { zEcd_CursorName, zEcd_CursorList, apzEcd_CursorMachs, (regex_t*)NULL, ECD_CURSOR_TEST_CT, FD_MACH_ONLY, @@ -3923,10 +3844,10 @@ tFixDesc fixDescList[ 105 ] = { HP_SYSFILE_TEST_CT, FD_MACH_ONLY, aHp_SysfileTests, apzHp_SysfilePatch }, - { zHpux_Cxx_UnreadyName, zHpux_Cxx_UnreadyList, - apzHpux_Cxx_UnreadyMachs, (regex_t*)NULL, - HPUX_CXX_UNREADY_TEST_CT, FD_MACH_ONLY, - aHpux_Cxx_UnreadyTests, apzHpux_Cxx_UnreadyPatch }, + { zCxx_UnreadyName, zCxx_UnreadyList, + apzCxx_UnreadyMachs, (regex_t*)NULL, + CXX_UNREADY_TEST_CT, FD_MACH_ONLY, + aCxx_UnreadyTests, apzCxx_UnreadyPatch }, { zHpux_MaxintName, zHpux_MaxintList, apzHpux_MaxintMachs, (regex_t*)NULL, @@ -4048,11 +3969,6 @@ tFixDesc fixDescList[ 105 ] = { MATH_GCC_IFNDEFS_TEST_CT, FD_MACH_ONLY, aMath_Gcc_IfndefsTests, apzMath_Gcc_IfndefsPatch }, - { zMotorola_Stupid_OptName, zMotorola_Stupid_OptList, - apzMotorola_Stupid_OptMachs, (regex_t*)NULL, - MOTOROLA_STUPID_OPT_TEST_CT, FD_MACH_ONLY, - aMotorola_Stupid_OptTests, apzMotorola_Stupid_OptPatch }, - { zNested_CommentName, zNested_CommentList, apzNested_CommentMachs, (regex_t*)NULL, NESTED_COMMENT_TEST_CT, FD_MACH_ONLY, @@ -4173,11 +4089,6 @@ tFixDesc fixDescList[ 105 ] = { SUN_AUTH_PROTO_TEST_CT, FD_MACH_ONLY, aSun_Auth_ProtoTests, apzSun_Auth_ProtoPatch }, - { zSunos_Large_MacroName, zSunos_Large_MacroList, - apzSunos_Large_MacroMachs, (regex_t*)NULL, - SUNOS_LARGE_MACRO_TEST_CT, FD_MACH_ONLY, - aSunos_Large_MacroTests, apzSunos_Large_MacroPatch }, - { zSunos_Matherr_DeclName, zSunos_Matherr_DeclList, apzSunos_Matherr_DeclMachs, (regex_t*)NULL, SUNOS_MATHERR_DECL_TEST_CT, FD_MACH_ONLY, @@ -4328,6 +4239,11 @@ tFixDesc fixDescList[ 105 ] = { ZZZ_KI_DEFS_TEST_CT, FD_MACH_ONLY, aZzz_Ki_DefsTests, apzZzz_Ki_DefsPatch }, + { zZzz_Bad_FixesName, zZzz_Bad_FixesList, + apzZzz_Bad_FixesMachs, (regex_t*)NULL, + ZZZ_BAD_FIXES_TEST_CT, FD_MACH_ONLY, + aZzz_Bad_FixesTests, apzZzz_Bad_FixesPatch }, + { zZzz_TimeName, zZzz_TimeList, apzZzz_TimeMachs, (regex_t*)NULL, ZZZ_TIME_TEST_CT, FD_MACH_ONLY, diff --git a/gcc/fixinc/inclhack.sh b/gcc/fixinc/inclhack.sh index 080c7f37798..b99ee32df02 100755 --- a/gcc/fixinc/inclhack.sh +++ b/gcc/fixinc/inclhack.sh @@ -2,15 +2,15 @@ # # DO NOT EDIT THIS FILE (inclhack.sh) # -# It has been autogen-ed Wednesday March 31, 1999 at 01:11:59 AM MST -# From the definitions /puke/law//egcs/egcs/gcc/fixinc/inclhack.def -# and the template file /puke/law//egcs/egcs/gcc/fixinc/inclhack.tpl +# It has been autogen-ed Wednesday March 31, 1999 at 12:02:52 PM PST +# From the definitions inclhack.def +# and the template file inclhack.tpl # # Install modified versions of certain ANSI-incompatible system header # files which are fixed to work correctly with ANSI C and placed in a # directory that GNU C will search. # -# This script contains 105 fixup scripts. +# This script contains 103 fixup scripts. # # See README-fixinc for more information. # @@ -97,7 +97,7 @@ case $LIB in esac echo Fixing headers into ${LIB} for ${target_canonical} target - + # Determine whether this system has symbolic links. if ln -s X $LIB/ShouldNotExist 2>/dev/null; then rm -f $LIB/ShouldNotExist @@ -108,7 +108,7 @@ elif ln -s X /tmp/ShouldNotExist 2>/dev/null; then else LINKS=false fi - + # # # # # # # # # # # # # # # # # # # # # # # Search each input directory for broken header files. @@ -126,6 +126,7 @@ for INPUT in ${INPUTLIST} ; do cd ${ORIGDIR} cd ${INPUT} || continue +INPUT=`${PWDCMD}` # # # # # # # # # # # # # # # # # # # # # # @@ -133,24 +134,27 @@ cd ${INPUT} || continue echo Finding directories and links to directories # Find all directories and all symlinks that point to directories. -# Put the list in $files. +# Put the list in $all_dirs. # Each time we find a symlink, add it to newdirs # so that we do another find within the dir the link points to. -# Note that $files may have duplicates in it; +# Note that $all_dirs may have duplicates in it; # later parts of this file are supposed to ignore them. dirs="." levels=2 +all_dirs="" +search_dirs="" + while [ -n "$dirs" ] && [ $levels -gt 0 ] do - levels=`expr $levels - 1` - newdirs= - for d in $dirs - do + levels=`expr $levels - 1` + newdirs= + for d in $dirs + do echo " Searching $INPUT/$d" - + # Find all directories under $d, relative to $d, excluding $d itself. # (The /. is needed after $d in case $d is a symlink.) - files="$files `find $d/. -type d -print | \ + all_dirs="$all_dirs `find $d/. -type d -print | \ sed -e '/\/\.$/d' -e 's@/./@/@g'`" # Find all links to directories. # Using `-exec test -d' in find fails on some systems, @@ -162,131 +166,151 @@ do theselinks=`find $d/. -type l -print | sed -e 's@/./@/@g'` for d1 in $theselinks --dummy-- do - # If the link points to a directory, - # add that dir to $newdirs - if [ -d $d1 ] - then - files="$files $d1" + # If the link points to a directory, + # add that dir to $newdirs + if [ -d $d1 ] + then + all_dirs="$all_dirs $d1" if [ "`ls -ld $d1 | sed -n 's/.*-> //p'`" != "." ] then - newdirs="$newdirs $d1" - fi + newdirs="$newdirs $d1" + search_dirs="$search_dirs $d1" fi + fi done - done - - dirs="$newdirs" + done + + dirs="$newdirs" done - + # # # # # # # # # # # # # # # # # # # # # # dirs= echo "All directories (including links to directories):" -echo $files - -for file in $files; do +echo $all_dirs + +for file in $all_dirs; do rm -rf $LIB/$file if [ ! -d $LIB/$file ] then mkdir $LIB/$file fi done mkdir $LIB/root - + # # # # # # # # # # # # # # # # # # # # # # # treetops gets an alternating list # of old directories to copy # and the new directories to copy to. -treetops="${INPUT} ${LIB}" - +treetops=". ${LIB}" + if $LINKS; then echo 'Making symbolic directory links' - for file in $files; do - dest=`ls -ld $file | sed -n 's/.*-> //p'` - if [ "$dest" ]; then - cwd=`${PWDCMD}` - # In case $dest is relative, get to $file's dir first. - cd ${INPUT} - cd `echo ./$file | sed -n 's&[^/]*$&&p'` - # Check that the target directory exists. - # Redirections changed to avoid bug in sh on Ultrix. - (cd $dest) > /dev/null 2>&1 - if [ $? = 0 ]; then - cd $dest - # X gets the dir that the link actually leads to. - x=`${PWDCMD}` - # Canonicalize ${INPUT} now to minimize the time an - # automounter has to change the result of ${PWDCMD}. - cinput=`cd ${INPUT}; ${PWDCMD}` - # If a link points to ., make a similar link to . - if [ $x = ${cinput} ]; then - echo $file '->' . ': Making link' - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s . ${LIB}/$file > /dev/null 2>&1 - # If link leads back into ${INPUT}, - # make a similar link here. - elif expr $x : "${cinput}/.*" > /dev/null; then - # Y gets the actual target dir name, relative to ${INPUT}. - y=`echo $x | sed -n "s&${cinput}/&&p"` - # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. - dots=`echo "$file" | - sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` - echo $file '->' $dots$y ': Making link' - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s $dots$y ${LIB}/$file > /dev/null 2>&1 - else - # If the link is to a dir $target outside ${INPUT}, - # repoint the link at ${INPUT}/root$target - # and process $target into ${INPUT}/root$target - # treat this directory as if it actually contained the files. - echo $file '->' root$x ': Making link' - if [ -d $LIB/root$x ] - then true + cwd=`${PWDCMD}` + + for sym_link in $search_dirs; do + cd ${INPUT} + dest=`ls -ld ${sym_link} | sed -n 's/.*-> //p'` + + # In case $dest is relative, get to ${sym_link}'s dir first. + # + cd ./`echo ${sym_link} | sed 's;/[^/]*$;;'` + + # Check that the target directory exists. + # Redirections changed to avoid bug in sh on Ultrix. + # + (cd $dest) > /dev/null 2>&1 + if [ $? = 0 ]; then + cd $dest + + # full_dest_dir gets the dir that the link actually leads to. + # + full_dest_dir=`${PWDCMD}` + + # Canonicalize ${INPUT} now to minimize the time an + # automounter has to change the result of ${PWDCMD}. + # + cinput=`cd ${INPUT}; ${PWDCMD}` + + # If a link points to ., make a similar link to . + # + if [ ${full_dest_dir} = ${cinput} ]; then + echo ${sym_link} '->' . ': Making self link' + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s . ${LIB}/${sym_link} > /dev/null 2>&1 + + # If link leads back into ${INPUT}, + # make a similar link here. + # + elif expr ${full_dest_dir} : "${cinput}/.*" > /dev/null; then + # Y gets the actual target dir name, relative to ${INPUT}. + y=`echo ${full_dest_dir} | sed -n "s&${cinput}/&&p"` + # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. + dots=`echo "${sym_link}" | + sed -e 's@^./@@' -e 's@/./@/@g' -e 's@[^/][^/]*@..@g' -e 's@..$@@'` + echo ${sym_link} '->' $dots$y ': Making local link' + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s $dots$y ${LIB}/${sym_link} > /dev/null 2>&1 + else - dirname=root$x/ - dirmade=. - cd $LIB - while [ x$dirname != x ]; do - component=`echo $dirname | sed -e 's|/.*$||'` - mkdir $component >/dev/null 2>&1 - cd $component - dirmade=$dirmade/$component - dirname=`echo $dirname | sed -e 's|[^/]*/||'` - done - fi - # Duplicate directory structure created in ${LIB}/$file in new - # root area. - for file2 in $files; do - case $file2 in - $file/*) - dupdir=${LIB}/root$x/`echo $file2 | sed -n "s|^${file}/||p"` - echo "Duplicating ${file}'s ${dupdir}" - if [ -d ${dupdir} ] + # If the link is to a dir $target outside ${INPUT}, + # repoint the link at ${INPUT}/root$target + # and process $target into ${INPUT}/root$target + # treat this directory as if it actually contained the files. + # + echo ${sym_link} '->' root${full_dest_dir} ': Making rooted link' + if [ -d $LIB/root${full_dest_dir} ] then true else - mkdir ${dupdir} - fi - ;; - *) - ;; - esac + dirname=root${full_dest_dir}/ + dirmade=. + cd $LIB + while [ x$dirname != x ]; do + component=`echo $dirname | sed -e 's|/.*$||'` + mkdir $component >/dev/null 2>&1 + cd $component + dirmade=$dirmade/$component + dirname=`echo $dirname | sed -e 's|[^/]*/||'` done - # Get the path from ${LIB} to $file, accounting for symlinks. - parent=`echo "$file" | sed -e 's@/[^/]*$@@'` - libabs=`cd ${LIB}; ${PWDCMD}` - file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` - # DOTS is the relative path from ${LIB}/$file's dir back to ${LIB}. - dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` - rm -fr ${LIB}/$file > /dev/null 2>&1 - ln -s ${dots}root$x ${LIB}/$file > /dev/null 2>&1 - treetops="$treetops $x ${LIB}/root$x" - fi + fi + + # Duplicate directory structure created in ${LIB}/${sym_link} in new + # root area. + # + for file2 in $all_dirs; do + case $file2 in + ${sym_link}/*) + dupdir=${LIB}/root${full_dest_dir}/`echo $file2 | + sed -n "s|^${sym_link}/||p"` + echo "Duplicating ${sym_link}'s ${dupdir}" + if [ -d ${dupdir} ] + then true + else + mkdir ${dupdir} + fi + ;; + *) + ;; + esac + done + + # Get the path from ${LIB} to ${sym_link}, accounting for symlinks. + # + parent=`echo "${sym_link}" | sed -e 's@/[^/]*$@@'` + libabs=`cd ${LIB}; ${PWDCMD}` + file2=`cd ${LIB}; cd $parent; ${PWDCMD} | sed -e "s@^${libabs}@@"` + + # DOTS is the relative path from ${LIB}/${sym_link} back to ${LIB}. + # + dots=`echo "$file2" | sed -e 's@/[^/]*@../@g'` + rm -fr ${LIB}/${sym_link} > /dev/null 2>&1 + ln -s ${dots}root${full_dest_dir} ${LIB}/${sym_link} > /dev/null 2>&1 + treetops="$treetops ${sym_link} ${LIB}/root${full_dest_dir}" fi - cd $cwd fi done fi - + # # # # # # # # # # # # # # # # # # # # # # required= @@ -297,6 +321,9 @@ while [ $# != 0 ]; do # SRCDIR=`cd ${INPUT} ; cd $1 ; ${PWDCMD}` export SRCDIR + + FIND_BASE=$1 + export FIND_BASE shift DESTDIR=`cd $1;${PWDCMD}` @@ -312,43 +339,44 @@ while [ $# != 0 ]; do touch ${DESTDIR}/DONE echo Fixing directory ${SRCDIR} into ${DESTDIR} - # Check .h files which are symlinks as well as those which are files. - # A link to a header file will not be processed by anything but this. + # Check files which are symlinks as well as those which are files. # - cd ${SRCDIR} - - if $LINKS; then - files=`find . -name '*.h' \( -type f -o -type l \) -print` + cd ${INPUT} + files=`if $LINKS; then + find ${FIND_BASE}/. \( -type f -o -type l \) -print else - files=`find . -name '*.h' -type f -print` - fi + find ${FIND_BASE}/. -type f -print + fi | \ + sed -e's;/\./;/;g' -e's;//*;/;g' ` + echo Checking header files for file in $files; do - if ( test ! -r $file -o \ - -n "`fgrep 'This file is part of the GNU C Library' $file`" ) + if ( test ! -r ${file} -o \ + -n "`fgrep 'This file is part of the GNU C Library' ${file}`" ) then continue ; fi fixlist="" + DESTFILE=${DESTDIR}/`echo ${file} | sed "s;${FIND_BASE}/;;" ` # # Fix 1: Aix_Syswait # - case "$file" in ./sys/wait.h ) - if ( test -n "`egrep 'bos325,' $file`" + case "${file}" in ./sys/wait.h ) + if ( test -n "`egrep 'bos325,' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} aix_syswait" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^extern pid_t wait3();$/i\ struct rusage; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -357,19 +385,19 @@ struct rusage; # # Fix 2: Aix_Volatile # - case "$file" in ./sys/signal.h ) - if ( test -n "`egrep 'typedef volatile int sig_atomic_t' $file`" + case "${file}" in ./sys/signal.h ) + if ( test -n "`egrep 'typedef volatile int sig_atomic_t' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} aix_volatile" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/typedef volatile int sig_atomic_t/typedef int sig_atomic_t/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -378,20 +406,20 @@ struct rusage; # # Fix 3: Alpha_Getopt # - case "$file" in ./stdio.h | \ + case "${file}" in ./stdio.h | \ ./stdlib.h ) - if ( test -n "`egrep 'getopt\\(int, char \\*\\[' $file`" + if ( test -n "`egrep 'getopt\\(int, char \\*\\[' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} alpha_getopt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/getopt(int, char \*\[\],[ ]*char \*)/getopt(int, char *const[], const char *)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -400,19 +428,19 @@ struct rusage; # # Fix 4: Alpha_Parens # - case "$file" in ./sym.h ) - if ( test -n "`egrep '#ifndef\\(__mips64\\)' $file`" + case "${file}" in ./sym.h ) + if ( test -n "`egrep '#ifndef\\(__mips64\\)' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} alpha_parens" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/#ifndef(__mips64)/#ifndef __mips64/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -421,19 +449,19 @@ struct rusage; # # Fix 5: Alpha_Sbrk # - case "$file" in ./unistd.h ) - if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' $file`" + case "${file}" in ./unistd.h ) + if ( test -n "`egrep 'char[ ]*\\*[ ]*sbrk[ ]*\\(' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} alpha_sbrk" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/char\([ ]*\*[ ]*sbrk[ ]*(\)/void\1/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -442,17 +470,17 @@ struct rusage; # # Fix 6: Arm_Norcroft_Hint # - case "$file" in ./X11/Intrinsic.h ) + case "${file}" in ./X11/Intrinsic.h ) fixlist="${fixlist} arm_norcroft_hint" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/___type p_type/p_type/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac @@ -460,20 +488,20 @@ struct rusage; # # Fix 7: Arm_Wchar # - case "$file" in ./stdlib.h ) - if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' $file`" + case "${file}" in ./stdlib.h ) + if ( test -n "`egrep '#[ ]*define[ ]*__wchar_t' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} arm_wchar" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/\(#[ ]*ifndef[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ -e 's/\(#[ ]*define[ ]*\)__wchar_t/\1_GCC_WCHAR_T/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -482,19 +510,19 @@ struct rusage; # # Fix 8: Aux_Asm # - case "$file" in ./sys/param.h ) - if ( test -n "`egrep '#ifndef NOINLINE' $file`" + case "${file}" in ./sys/param.h ) + if ( test -n "`egrep '#ifndef NOINLINE' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} aux_asm" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's|#ifndef NOINLINE|#if !defined(NOINLINE) \&\& !defined(__GNUC__)|' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -503,15 +531,15 @@ struct rusage; # # Fix 9: Avoid_Bool # - case "$file" in ./curses.h | \ + case "${file}" in ./curses.h | \ ./curses_colr/curses.h | \ ./term.h | \ ./tinfo.h ) fixlist="${fixlist} avoid_bool" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^#[ ]*define[ ][ ]*bool[ ][ ]*char[ ]*$/i\ #ifndef __cplusplus @@ -525,87 +553,56 @@ struct rusage; -e '/^typedef[ ][ ]*char[ ][ ]*bool[ ]*;/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - ;; # case end for file name test - esac - - - # - # Fix 10: Bad_Malloc_Decl - # - case "$file" in ./rpc/types.h ) - if ( test -z "`egrep '\"C\"' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - bad_malloc_decl" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - - sed -e '1i\ -#ifdef __cplusplus\ -extern "C" {\ -#endif\ - -' \ - -e '$a\ -#ifdef __cplusplus\ -}\ -#endif -' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi # end of selection 'if' + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 11: Bad_Struct_Term + # Fix 10: Bad_Struct_Term # - case "$file" in ./curses.h ) - if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' $file`" + case "${file}" in ./curses.h ) + if ( test -n "`egrep '^[ ]*typedef[ ]+struct[ ]+term[ ]*;' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} bad_struct_term" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^[ ]*typedef[ ][ ]*\(struct[ ][ ]*term[ ]*;[ ]*\)$/\1/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 12: Badquote + # Fix 11: Badquote # - case "$file" in ./sundev/vuid_event.h ) + case "${file}" in ./sundev/vuid_event.h ) fixlist="${fixlist} badquote" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/doesn'\''t/does not/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 13: Bad_Lval + # Fix 12: Bad_Lval # - case "$file" in ./libgen.h | \ + case "${file}" in ./libgen.h | \ ./dirent.h | \ ./ftw.h | \ ./grp.h | \ @@ -619,159 +616,163 @@ extern "C" {\ ./stropts.h | \ ./time.h | \ ./unistd.h ) - if ( test -n "`egrep '^[ ]*#[ ]*pragma[ ]extern_prefix' $file`" + if ( test -n "`egrep '^[ ]*#[ ]*pragma[ ]extern_prefix' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} bad_lval" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^[ ]*#[ ]*define[ ]*\([^(]*\)\(([^)]*)\)[ ]*\(_.\)\1\2[ ]*$/#define \1 \3\1/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 14: Broken_Assert_Stdio + # Fix 13: Broken_Assert_Stdio # - case "$file" in ./assert.h ) - if ( test -n "`egrep 'stderr' $file`" -a \ - -z "`egrep 'include.*stdio.h' $file`" + case "${file}" in ./assert.h ) + if ( test -n "`egrep 'stderr' ${file}`" -a \ + -z "`egrep 'include.*stdio.h' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} broken_assert_stdio" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '1i\ #include ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 15: Broken_Assert_Stdlib + # Fix 14: Broken_Assert_Stdlib # - case "$file" in ./assert.h ) - if ( test -n "`egrep 'exit *\\(|abort *\\(' $file`" -a \ - -z "`egrep 'include.*stdlib.h' $file`" + case "${file}" in ./assert.h ) + if ( test -n "`egrep 'exit *\\(|abort *\\(' ${file}`" -a \ + -z "`egrep 'include.*stdlib.h' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} broken_assert_stdlib" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '1i\ #ifdef __cplusplus\ #include \ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 16: Bsd43_Io_Macros + # Fix 15: Bsd43_Io_Macros # - if ( test -n "`egrep 'BSD43__IO' $file`" + if ( test -n "`egrep 'BSD43__IO' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} bsd43_io_macros" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/[ ]BSD43__IO[A-Z]*[ ]*(/s/(\(.\),/('\''\1'\'',/' \ -e '/#[ ]*define[ ]*[ ]BSD43__IO/s/'\''\([cgx]\)'\''/\1/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 17: No_Double_Slash + # Fix 16: Dec_Intern_Asm # - if ( test -n "`egrep '//[^*]' $file`" -a \ - '(' -z "`echo ${file}|egrep '++$|\.hh$|\.H$'`" ')' - ) > /dev/null 2>&1 ; then + case "${file}" in ./c_asm.h ) fixlist="${fixlist} - no_double_slash" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + dec_intern_asm" + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi - sed -e '/\/\/[^*]/s|//.*$||g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi # end of selection 'if' + sed -e '/^[ ]*float[ ]*fasm/i +#ifdef __DECC +' \ + -e '/^[ ]*#[ ]*pragma[ ]*intrinsic([ ]*dasm/a +#endif +' \ + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} + ;; # case end for file name test + esac # - # Fix 18: Irix_Bogus_Cxx_Cmnt + # Fix 17: No_Double_Slash # - case "$file" in ./elf_abi.h | \ - ./elf.h ) + if ( test -n "`egrep '//[^\"*]' ${file}`" -a \ + '(' -z "`echo ${file}|egrep 'cxx/|++$|\.hh$|\.H$'`" ')' + ) > /dev/null 2>&1 ; then fixlist="${fixlist} - irix_bogus_cxx_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + no_double_slash" + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi - sed -e 's@"/\*"\*/@"//"@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - ;; # case end for file name test - esac + sed -e '/\/\/[^"*]/s|//.*$||g' \ + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} + fi # end of selection 'if' # - # Fix 19: Ecd_Cursor + # Fix 18: Ecd_Cursor # - case "$file" in ./sunwindow/win_lock.h | \ + case "${file}" in ./sunwindow/win_lock.h | \ ./sunwindow/win_cursor.h ) fixlist="${fixlist} ecd_cursor" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/ecd.cursor/ecd_cursor/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 20: Else_Label + # Fix 19: Else_Label # - if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' $file`" + if ( test -n "`egrep '^[ ]*#[ ]*else[ ]+[!-.0-~]' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} else_label" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e ':loop /\\$/N @@ -780,22 +781,22 @@ s/\\$/\\+++fixinc_eol+++/ s/\\+++fixinc_eol+++/\\/g s%^\([ ]*#[ ]*else\)[ ]*/[^*].*%\1% s%^\([ ]*#[ ]*else\)[ ]*[^/ ].*%\1%' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 21: Endif_Label + # Fix 20: Endif_Label # - if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]' $file`" + if ( test -n "`egrep '^[ ]*#[ ]*endif[ ]+[!-.0-z{|}~]' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} endif_label" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e ':loop /\\$/N @@ -805,66 +806,67 @@ s/\\+++fixinc_eol+++/\\/g s%^\([ ]*#[ ]*endif\)[ ]*/[^*].*%\1% s%^\([ ]*#[ ]*endif\)[ ]*\*[^/].*%\1% s%^\([ ]*#[ ]*endif\)[ ]*[^/* ].*%\1%' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 22: Hp_Inline + # Fix 21: Hp_Inline # - case "$file" in ./sys/spinlock.h ) - if ( test -n "`egrep 'include.*\"\\.\\./machine/' $file`" + case "${file}" in ./sys/spinlock.h ) + if ( test -n "`egrep 'include.*\"\\.\\./machine/' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} hp_inline" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's,"../machine/inline.h",,' \ -e 's,"../machine/psl.h",,' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 23: Hp_Sysfile + # Fix 22: Hp_Sysfile # - case "$file" in ./sys/file.h ) - if ( test -n "`egrep 'HPUX_SOURCE' $file`" + case "${file}" in ./sys/file.h ) + if ( test -n "`egrep 'HPUX_SOURCE' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} hp_sysfile" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/(\.\.\.)/(struct file * ...)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 24: Hpux_Cxx_Unready + # Fix 23: Cxx_Unready # - case "$file" in ./sys/mman.h ) - if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' $file`" + case "${file}" in ./sys/mman.h | \ + ./rpc/types.h ) + if ( test -z "`egrep '\"C\"|__BEGIN_DECLS' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} - hpux_cxx_unready" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + cxx_unready" + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '1i\ #ifdef __cplusplus\ @@ -877,23 +879,23 @@ extern "C" {\ }\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 25: Hpux_Maxint + # Fix 24: Hpux_Maxint # - case "$file" in ./sys/param.h ) + case "${file}" in ./sys/param.h ) fixlist="${fixlist} hpux_maxint" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^#[ ]*define[ ]*MAXINT[ ]/i\ #ifndef MAXINT @@ -901,295 +903,298 @@ extern "C" {\ -e '/^#[ ]*define[ ]*MAXINT[ ]/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 26: Hpux_Systime + # Fix 25: Hpux_Systime # - case "$file" in ./sys/time.h ) - if ( test -n "`egrep '^extern struct sigevent;' $file`" + case "${file}" in ./sys/time.h ) + if ( test -n "`egrep '^extern struct sigevent;' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} hpux_systime" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^extern struct sigevent;/struct sigevent;/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 27: Interactv_Add1 + # Fix 26: Interactv_Add1 # - case "$file" in ./stdio.h | \ + case "${file}" in ./stdio.h | \ ./math.h | \ ./ctype.h | \ ./sys/limits.h | \ ./sys/fcntl.h | \ ./sys/dirent.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} interactv_add1" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/!defined(__STDC__) && !defined(_POSIX_SOURCE)/!defined(_POSIX_SOURCE)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 28: Interactv_Add2 + # Fix 27: Interactv_Add2 # - case "$file" in ./math.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + case "${file}" in ./math.h ) + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} interactv_add2" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/fmod(double)/fmod(double, double)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 29: Interactv_Add3 + # Fix 28: Interactv_Add3 # - case "$file" in ./sys/limits.h ) - if ( test '(' -d /etc/conf/kconfig.d ')' -a \ - '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' + case "${file}" in ./sys/limits.h ) + if ( test '(' -d /etc/conf/kconfig.d ')' -a \ + '(' -n "`grep _POSIX_VERSION /usr/include/sys/unistd.h`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} interactv_add3" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/CHILD_MAX/s,/\* Max, Max,' \ -e '/OPEN_MAX/s,/\* Max, Max,' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 30: Io_Def_Quotes + # Fix 29: Io_Def_Quotes # - if ( test -n "`egrep '[ ]_IO[A-Z]*[ ]*\\([A-Za-z]' $file`" + if ( test -n "`egrep '[ ](_|DES)IO[A-Z]*[ ]*\\( *[^,'\\'']' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} io_def_quotes" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi - sed -e 's/\([ ]_IO[A-Z]*[ ]*(\)\([A-Za-z]\),/\1'\''\2'\'',/' \ + sed -e 's/\([ ](_|DES)IO[A-Z]*[ ]*(\)\([^,'\'']\),/\1'\''\2'\'',/' \ -e '/#[ ]*define[ ]*[ ]_IO/s/'\''\([cgxtf]\)'\''/\1/g' \ -e '/#[ ]*define[ ]*[ ]DESIOC/s/'\''\([cdgx]\)'\''/\1/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 31: Ioctl_Fix_Ctrl + # Fix 30: Ioctl_Fix_Ctrl # - if ( test -n "`egrep 'CTRL[ ]' $file`" + if ( test -n "`egrep 'CTRL[ ]' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} ioctl_fix_ctrl" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/[^A-Z0-9_]CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ -e '/[^A-Z0-9]_CTRL[ ]*(/s/\([^'\'']\))/'\''\1'\'')/' \ -e '/#[ ]*define[ ]*[ ]CTRL/s/'\''\([cgx]\)'\''/\1/g' \ -e '/#[ ]*define[ ]*[ ]_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ -e '/#[ ]*define[ ]*[ ]BSD43_CTRL/s/'\''\([cgx]\)'\''/\1/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 32: Ip_Missing_Semi + # Fix 31: Ip_Missing_Semi # - case "$file" in ./netinet/ip.h ) + case "${file}" in ./netinet/ip.h ) fixlist="${fixlist} ip_missing_semi" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^struct/,/^};/s/}$/};/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 33: Irix_Multiline_Cmnt + # Fix 32: Irix_Multiline_Cmnt # - case "$file" in ./sys/types.h ) + case "${file}" in ./sys/types.h ) fixlist="${fixlist} irix_multiline_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@type of the result@type of the result */@' \ -e 's@of the sizeof@/* of the sizeof@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 34: Irix_Sockaddr + # Fix 33: Irix_Sockaddr # - case "$file" in ./rpc/auth.h ) - if ( test -n "`egrep 'authdes_create.*struct sockaddr' $file`" + case "${file}" in ./rpc/auth.h ) + if ( test -n "`egrep 'authdes_create.*struct sockaddr' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} irix_sockaddr" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/authdes_create.*struct sockaddr/i\ struct sockaddr; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 35: Irix_Struct__File + # Fix 34: Irix_Struct__File # - case "$file" in ./rpc/xdr.h ) + case "${file}" in ./rpc/xdr.h ) fixlist="${fixlist} irix_struct__file" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/xdrstdio_create.*struct __file_s/i\ struct __file_s; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 36: Isc_Fmod + # Fix 35: Isc_Fmod # - case "$file" in ./math.h ) - if ( test -n "`egrep 'fmod\\(double\\)' $file`" + case "${file}" in ./math.h ) + if ( test -n "`egrep 'fmod\\(double\\)' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} isc_fmod" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/fmod(double)/fmod(double, double)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 37: Motorola_Nested + # Fix 36: Motorola_Nested # - case "$file" in ./limits.h | \ + case "${file}" in ./limits.h | \ ./sys/limits.h ) + case "$target_canonical" in m68k-motorola-sysv* ) fixlist="${fixlist} motorola_nested" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@^\(#undef[ ][ ]*PIPE_BUF[ ]*/\* max # bytes atomic in write to a\)$@\1 */@' \ -e 's@\(/\*#define HUGE_VAL 3.40282346638528860e+38 \)\(/\*error value returned by Math lib\*/\)$@\1*/ \2@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} + ;; # case end for machine type test + esac ;; # case end for file name test esac # - # Fix 38: Isc_Sys_Limits + # Fix 37: Isc_Sys_Limits # - case "$file" in ./sys/limits.h ) - if ( test -n "`egrep 'CHILD_MAX' $file`" + case "${file}" in ./sys/limits.h ) + if ( test -n "`egrep 'CHILD_MAX' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} isc_sys_limits" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/CHILD_MAX/s,/\* Max, Max,' \ -e '/OPEN_MAX/s,/\* Max, Max,' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 39: Kandr_Concat + # Fix 38: Kandr_Concat # - case "$file" in ./sparc/asm_linkage.h | \ + case "${file}" in ./sparc/asm_linkage.h | \ ./sun3/asm_linkage.h | \ ./sun3x/asm_linkage.h | \ ./sun4/asm_linkage.h | \ @@ -1207,34 +1212,34 @@ struct __file_s; ./sys/tty.h | \ ./Xm.acorn/XmP.h | \ ./bsd43/bsd43_.h ) - if ( test -n "`egrep '/\\*\\*/' $file`" + if ( test -n "`egrep '/\\*\\*/' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} kandr_concat" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi - sed -e 's|/\*\*/| ## |g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + sed -e 's|/\*\*/|##|g' \ + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 40: Limits_Ifndefs + # Fix 39: Limits_Ifndefs # - case "$file" in ./limits.h ) - if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' $file`" + case "${file}" in ./limits.h ) + if ( test -z "`egrep 'ifndef[ ]+FLT_MIN' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} limits_ifndefs" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/[ ]FLT_MIN[ ]/i\ #ifndef FLT_MIN @@ -1273,63 +1278,66 @@ struct __file_s; #endif ' \ -e '/^\(\/\*#define HUGE_VAL 3\.[0-9e+]* *\)\/\*/s//\1/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 41: Lynx_Void_Int + # Fix 40: Lynx_Void_Int # - case "$file" in ./curses.h ) - if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' $file`" + case "${file}" in ./curses.h ) + if ( test -n "`egrep '#[ ]*define[ ]+void[ ]+int' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} lynx_void_int" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/#[ ]*define[ ][ ]*void[ ]int/d' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 42: Lynxos_Fcntl_Proto + # Fix 41: Lynxos_Fcntl_Proto # - case "$file" in ./fcntl.h ) + case "${file}" in ./fcntl.h ) + if ( test -n "`egrep 'fcntl.*\\(int, int, int\\)' ${file}`" + ) > /dev/null 2>&1 ; then fixlist="${fixlist} lynxos_fcntl_proto" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} + fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 43: M88k_Bad_Hypot_Opt + # Fix 42: M88k_Bad_Hypot_Opt # - case "$file" in ./math.h ) + case "${file}" in ./math.h ) case "$target_canonical" in m88k-motorola-sysv3* ) fixlist="${fixlist} m88k_bad_hypot_opt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/extern double floor(), ceil(), fmod(), fabs();/extern double floor(), ceil(), fmod(), fabs _PARAMS((double));/' \ -e '/^extern double hypot();$/a\ @@ -1346,9 +1354,9 @@ static __inline__ double fake_hypot (x, y)\ }\ #define hypot fake_hypot ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for machine type test esac ;; # case end for file name test @@ -1356,23 +1364,23 @@ static __inline__ double fake_hypot (x, y)\ # - # Fix 44: M88k_Bad_S_If + # Fix 43: 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 fixlist="${fixlist} m88k_bad_s_if" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(S_IF[A-Z][A-Z][A-Z][A-Z]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \ -e 's/^\(#define[ ]*S_IS[A-Z]*(m)\)[ ]*(m[ ]*&[ ]*\(0[0-9]*\)[ ]*)/\1 (((m)\&S_IFMT)==\2)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for machine type test esac @@ -1381,34 +1389,31 @@ static __inline__ double fake_hypot (x, y)\ # - # Fix 45: M88k_Multi_Incl + # Fix 44: 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 fixlist="${fixlist} m88k_multi_incl" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi ( echo Fixing $file, to protect against multiple inclusion. >&2 cpp_wrapper=`echo $file | sed -e 's,\.,_,g' -e 's,/,_,g'` - sed -e "1i\ -#ifndef __GCC_GOT_${cpp_wrapper}_\ -#define __GCC_GOT_${cpp_wrapper}_\ -" \ - -e "$a\ -#endif /* ! __GCC_GOT_${cpp_wrapper}_ */ -" ) < $infile > ${DESTDIR}/$file. + echo "#ifndef __GCC_GOT_${cpp_wrapper}_" + echo "#define __GCC_GOT_${cpp_wrapper}_" + cat + echo "#endif /* ! __GCC_GOT_${cpp_wrapper}_ */" ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for machine type test esac @@ -1417,15 +1422,15 @@ static __inline__ double fake_hypot (x, y)\ # - # Fix 46: Machine_Name + # Fix 45: 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 fixlist="${fixlist} machine_name" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e ':loop /\\$/N @@ -1462,23 +1467,23 @@ s/\\+++fixinc_eol+++/\\/g s/ vax / __vax__ /g s/ \([a-zA-Z0-9_][a-zA-Z0-9_]*\) /\1/g }' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 47: Math_Exception + # Fix 46: Math_Exception # - case "$file" in ./math.h ) - if ( test -n "`egrep 'struct exception' $file`" + case "${file}" in ./math.h ) + if ( test -n "`egrep 'struct exception' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} math_exception" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/struct exception/i\ #ifdef __cplusplus\ @@ -1500,121 +1505,77 @@ s/\\+++fixinc_eol+++/\\/g #undef exception\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 48: Math_Gcc_Ifndefs + # Fix 47: Math_Gcc_Ifndefs # - case "$file" in ./math.h ) + case "${file}" in ./math.h ) fixlist="${fixlist} math_gcc_ifndefs" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( dbl_max_def="`egrep 'define[ ]+DBL_MAX[ ]+.*' ${SRCDIR}/float.h 2>/dev/null`" + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( dbl_max_def=`egrep 'define[ ]+DBL_MAX[ ]+.*' float.h 2>/dev/null` if ( test -n "${dbl_max_def}" \ -a -n "`egrep '#define[ ]*HUGE_VAL[ ]+DBL_MAX' $file`" \ -a -z "`egrep '#define[ ]+DBL_MAX[ ]+' $file`" ) > /dev/null 2>&1 - then sed -e '/define[ ]HUGE_VAL[ ]/i\ + then sed -e '/define[ ]HUGE_VAL[ ]DBL_MAX/s/DBL_MAX/$dbl_max_def/' + else cat ; fi | + sed -e'/define[ ]HUGE_VAL[ ]/i\ #ifndef HUGE_VAL -' \ - -e '/define[ ]HUGE_VAL[ ]/a\ +' -e'/define[ ]HUGE_VAL[ ]/a\ #endif -'\ - -e "/define[ ]HUGE_VAL[ ]DBL_MAX/s/DBL_MAX/$dbl_max_def/" - else sed -e '/define[ ]HUGE_VAL[ ]/i\ -#ifndef HUGE_VAL -' \ - -e '/define[ ]HUGE_VAL[ ]/a\ -#endif -' - fi ) < $infile > ${DESTDIR}/$file. +' ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - ;; # case end for file name test - esac - - - # - # Fix 49: Motorola_Stupid_Opt - # - case "$file" in ./math.h ) - case "$target_canonical" in m88k-motorola-sysv3* ) - if ( test -n "`egrep '^extern double hypot();$' $file`" - ) > /dev/null 2>&1 ; then - fixlist="${fixlist} - motorola_stupid_opt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - - sed -e '/^extern double hypot();$/a\ -\/* Workaround a stupid Motorola optimization if one\ - of x or y is 0.0 and the other is negative! *\/\ -#ifdef __STDC__\ -static __inline__ double fake_hypot (double x, double y)\ -#else\ -static __inline__ double fake_hypot (x, y)\ - double x, y;\ -#endif\ -{\ - return fabs (hypot (x, y));\ -}\ -#define hypot fake_hypot -' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi # end of selection 'if' - ;; # case end for machine type test - esac + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 50: Nested_Comment + # Fix 48: Nested_Comment # - case "$file" in ./rpc/rpc.h ) + case "${file}" in ./rpc/rpc.h ) fixlist="${fixlist} nested_comment" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\1*/ /*@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 51: News_Os_Recursion + # Fix 49: News_Os_Recursion # - case "$file" in ./stdlib.h ) - if ( test -n "`egrep '#include ' $file`" + case "${file}" in ./stdlib.h ) + if ( test -n "`egrep '#include ' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} news_os_recursion" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^#include /i\ #ifdef BOGUS_RECURSION @@ -1622,203 +1583,209 @@ static __inline__ double fake_hypot (x, y)\ -e '/^#include /a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 52: Next_Math_Prefix + # Fix 50: Next_Math_Prefix # - case "$file" in ./ansi/math.h ) - if ( test -n "`egrep '^extern.*double.*__const__.*' $file`" + case "${file}" in ./ansi/math.h ) + if ( test -n "`egrep '^extern.*double.*__const__.*' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} next_math_prefix" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^extern.*double.*__const__.*sqrt(/s/__const__//' \ -e '/^extern.*double.*__const__.*fabs(/s/__const__//' \ -e '/^extern.*double.*__const__.*cos(/s/__const__//' \ -e '/^extern.*double.*__const__.*hypot(/s/__const__//' \ -e '/^extern.*double.*__const__.*sin(/s/__const__//' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 53: Next_Template + # Fix 51: Next_Template # - case "$file" in ./bsd/libc.h ) - if ( test -n "`egrep 'template' $file`" + case "${file}" in ./bsd/libc.h ) + if ( test -n "`egrep 'template' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} next_template" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/\(.*template\)/s/template//' \ -e '/extern.*volatile.*void.*abort/s/volatile//' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 54: Next_Volitile + # Fix 52: Next_Volitile # - case "$file" in ./ansi/stdlib.h ) - if ( test -n "`egrep 'volatile' $file`" + case "${file}" in ./ansi/stdlib.h ) + if ( test -n "`egrep 'volatile' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} next_volitile" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/extern.*volatile.*void.*exit/s/volatile//' \ -e '/extern.*volatile.*void.*abort/s/volatile//' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 55: Next_Wait_Union + # Fix 53: Next_Wait_Union # - case "$file" in ./sys/wait.h ) - if ( test -n "`egrep 'wait\\(union wait' $file`" + case "${file}" in ./sys/wait.h ) + if ( test -n "`egrep 'wait\\(union wait' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} next_wait_union" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@wait(union wait@wait(void@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 56: Nodeent_Syntax + # Fix 54: Nodeent_Syntax # - case "$file" in ./netdnet/dnetdb.h ) + case "${file}" in ./netdnet/dnetdb.h ) fixlist="${fixlist} nodeent_syntax" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/char.*na_addr *$/char *na_addr;/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 57: Osf_Namespace_A + # Fix 55: Osf_Namespace_A # - case "$file" in ./reg_types.h | \ + case "${file}" in ./reg_types.h | \ ./sys/lc_core.h ) - if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' + if ( test '(' -r reg_types.h ')' -a \ + '(' -r sys/lc_core.h ')' -a \ + '(' -n "`grep '} regex_t;' reg_types.h`" ')' -a \ + '(' -z "`grep __regex_t regex.h`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} osf_namespace_a" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/regex_t/__regex_t/g' \ -e 's/regoff_t/__regoff_t/g' \ -e 's/regmatch_t/__regmatch_t/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 58: Osf_Namespace_B + # Fix 56: Osf_Namespace_B # - case "$file" in ./regex.h ) - if ( test '(' -r reg_types.h-a -r sys/lc_core.h-a -n "`grep '} regex_t;' reg_types.h`"-a -z "`grep __regex_t regex.h`" ')' + case "${file}" in ./regex.h ) + if ( test '(' -r reg_types.h ')' -a \ + '(' -r sys/lc_core.h ')' -a \ + '(' -n "`grep '} regex_t;' reg_types.h`" ')' -a \ + '(' -z "`grep __regex_t regex.h`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} osf_namespace_b" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/#include /a\ typedef __regex_t regex_t;\ typedef __regoff_t regoff_t;\ typedef __regmatch_t regmatch_t; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 59: Pthread_Page_Size + # Fix 57: Pthread_Page_Size # - case "$file" in ./pthread.h ) - if ( test -n "`egrep '^int __page_size' $file`" + case "${file}" in ./pthread.h ) + if ( test -n "`egrep '^int __page_size' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} pthread_page_size" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^int __page_size/extern int __page_size/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 60: Rs6000_Double + # Fix 58: Rs6000_Double # - case "$file" in ./math.h ) - if ( test -n "`egrep '[^a-zA-Z_]class\\(' $file`" + case "${file}" in ./math.h ) + if ( test -n "`egrep '[^a-zA-Z_]class\\(' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} rs6000_double" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/class[(]/i\ #ifndef __cplusplus @@ -1826,105 +1793,105 @@ typedef __regmatch_t regmatch_t; -e '/class[(]/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 61: Rs6000_Fchmod + # Fix 59: Rs6000_Fchmod # - case "$file" in ./sys/stat.h ) - if ( test -n "`egrep 'fchmod\\(char' $file`" + case "${file}" in ./sys/stat.h ) + if ( test -n "`egrep 'fchmod\\(char' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} rs6000_fchmod" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/fchmod(char \*/fchmod(int/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 62: Rs6000_Param + # Fix 60: Rs6000_Param # - case "$file" in ./stdio.h | \ + case "${file}" in ./stdio.h | \ ./unistd.h ) fixlist="${fixlist} rs6000_param" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@rename(const char \*old, const char \*new)@rename(const char *_old, const char *_new)@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 63: Sony_Include + # Fix 61: Sony_Include # - case "$file" in ./machine/machparam.h ) - if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' $file`" + case "${file}" in ./machine/machparam.h ) + if ( test -n "`egrep '\"\\.\\./machine/endian.h\"' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sony_include" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@"../machine/endian.h"@@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 64: Statsswtch + # Fix 62: Statsswtch # - case "$file" in ./rpcsvc/rstat.h ) - if ( test -n "`egrep 'boottime$' $file`" + case "${file}" in ./rpcsvc/rstat.h ) + if ( test -n "`egrep 'boottime$' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} statsswtch" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/boottime$/boottime;/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 65: Stdio_Va_List + # Fix 63: Stdio_Va_List # - case "$file" in ./stdio.h ) + case "${file}" in ./stdio.h ) fixlist="${fixlist} stdio_va_list" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi ( if ( egrep "__need___va_list" $file ) > /dev/null 2>&1 ; then : else @@ -1942,73 +1909,73 @@ typedef __regmatch_t regmatch_t; -e 's@GNUC_VA_LIST@GNUC_Va_LIST@' \ -e 's@_NEED___VA_LIST@_NEED___Va_LIST@' \ -e 's@VA_LIST@DUMMY_VA_LIST@' \ - -e 's@_Va_LIST@_VA_LIST@' ) < $infile > ${DESTDIR}/$file. + -e 's@_Va_LIST@_VA_LIST@' ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 66: Sun_Bogus_Ifdef + # Fix 64: Sun_Bogus_Ifdef # - case "$file" in ./hsfs/hsfs_spec.h | \ + case "${file}" in ./hsfs/hsfs_spec.h | \ ./hsfs/iso_spec.h ) - if ( test -n "`egrep '#ifdef __i386__ || __vax__' $file`" + if ( test -n "`egrep '#ifdef __i386__ || __vax__' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_bogus_ifdef" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/\#ifdef __i386__ || __vax__/\#if __i386__ || __vax__/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 67: Sun_Bogus_Ifdef_Sun4c + # Fix 65: Sun_Bogus_Ifdef_Sun4c # - case "$file" in ./hsfs/hsnode.h ) - if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' $file`" + case "${file}" in ./hsfs/hsnode.h ) + if ( test -n "`egrep '#ifdef __i386__ || __sun4c__' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_bogus_ifdef_sun4c" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/\#ifdef __i386__ || __sun4c__/\#if __i386__ || __sun4c__/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 68: Sun_Catmacro + # Fix 66: Sun_Catmacro # - case "$file" in ./pixrect/memvar.h ) - if ( test -n "`egrep '^#define[ ]+CAT(a,b)' $file`" + case "${file}" in ./pixrect/memvar.h ) + if ( test -n "`egrep '^#define[ ]+CAT(a,b)' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_catmacro" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^#define[ ]CAT(a,b)/ i\ #ifdef __STDC__ \ @@ -2018,46 +1985,46 @@ typedef __regmatch_t regmatch_t; -e '/^#define[ ]CAT(a,b)/ a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 69: Sun_Malloc + # Fix 67: Sun_Malloc # - case "$file" in ./malloc.h ) + case "${file}" in ./malloc.h ) fixlist="${fixlist} sun_malloc" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/typedef[ ]char \* malloc_t/typedef void \* malloc_t/g' \ -e 's/int[ ][ ]*free/void free/g' \ -e 's/char\([ ]*\*[ ]*malloc\)/void\1/g' \ -e 's/char\([ ]*\*[ ]*realloc\)/void\1/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 70: Sun_Memcpy + # Fix 68: Sun_Memcpy # - case "$file" in ./memory.h ) - if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' $file`" + case "${file}" in ./memory.h ) + if ( test -n "`egrep '/\\* @\\(#\\)(head/memory.h 50.1 |memory\\.h 1\\.[2-4] 8./../.. SMI; from S5R2 1\\.2 )\\*/' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_memcpy" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '1i\ /* This file was generated by fixincludes */\ @@ -2081,47 +2048,47 @@ extern int memcmp();\ #endif /* __memory_h__ */ ' \ -e '1,$d' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 71: Sun_Rusers_Semi + # Fix 69: Sun_Rusers_Semi # - case "$file" in ./rpcsvc/rusers.h ) - if ( test -n "`egrep '_cnt$' $file`" + case "${file}" in ./rpcsvc/rusers.h ) + if ( test -n "`egrep '_cnt$' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_rusers_semi" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^struct/,/^};/s/_cnt$/_cnt;/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 72: Sun_Signal + # Fix 70: Sun_Signal # - case "$file" in ./sys/signal.h | \ + case "${file}" in ./sys/signal.h | \ ./signal.h ) - if ( test -n "`egrep '^void \\(\\*signal\\(\\)\\)\\(\\);' $file`" + if ( test -n "`egrep '^void \\(\\*signal\\(\\)\\)\\(\\);' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_signal" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^void (\*signal())();$/i\ #ifdef __cplusplus\ @@ -2131,30 +2098,30 @@ void (*signal(...))(...);\ -e '/^void (\*signal())();$/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 73: Sun_Auth_Proto + # Fix 71: Sun_Auth_Proto # - case "$file" in ./rpc/auth.h | \ + case "${file}" in ./rpc/auth.h | \ ./rpc/clnt.h | \ ./rpc/svc.h | \ ./rpc/xdr.h ) case "$target_canonical" in *-sun-* ) - if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' $file`" -a \ - -z "`egrep '\\(\\*[a-z][a-z_]*\\)\\([ ]*[a-zA-Z.].*\\)' $file`" + if ( test -n "`egrep '\\(\\*[a-z][a-z_]*\\)\\(\\)' ${file}`" -a \ + -z "`egrep '\\(\\*[a-z][a-z_]*\\)\\([ ]*[a-zA-Z.].*\\)' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} sun_auth_proto" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^\(.*(\*[a-z][a-z_]*)(\)\();.*\)/\ #ifdef __cplusplus\ @@ -2162,9 +2129,9 @@ void (*signal(...))(...);\ #else\ \1\2\ #endif/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for machine type test esac @@ -2173,86 +2140,60 @@ void (*signal(...))(...);\ # - # Fix 74: Sunos_Large_Macro - # - case "$file" in ./sundev/ipi_error.h ) - fixlist="${fixlist} - sunos_large_macro" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to SunOS " >&2 -rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. - - # Shell scripts have the potential of removing the output - # We interpret that to mean the file is not to be altered - # - if test ! -f ${DESTDIR}/$file. - then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - ;; # case end for file name test - esac - - - # - # Fix 75: Sunos_Matherr_Decl + # Fix 72: Sunos_Matherr_Decl # - case "$file" in ./math.h ) - if ( test '(' "`fgrep 'struct exception' $file | line`" != 'struct exception {' ')' - ) > /dev/null 2>&1 ; then + case "${file}" in ./math.h ) fixlist="${fixlist} sunos_matherr_decl" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi - sed -e '/matherr/i\ + sed -e '/^struct exception/,$b' \ + -e '/matherr/i\ struct exception; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file - fi # end of selection 'if' + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 76: Sunos_Strlen + # Fix 73: Sunos_Strlen # - case "$file" in ./strings.h ) + case "${file}" in ./strings.h ) fixlist="${fixlist} sunos_strlen" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/int[ ]*strlen();/__SIZE_TYPE__ strlen();/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 77: Systypes + # Fix 74: Systypes # - case "$file" in ./sys/types.h | \ + case "${file}" in ./sys/types.h | \ ./stdlib.h | \ ./sys/stdtypes.h | \ ./stddef.h | \ ./memory.h | \ ./unistd.h ) - if ( test -n "`egrep 'typedef[ ]+[a-z_][ a-z_]*[ ](size|ptrdiff|wchar)_t' $file`" + if ( test -n "`egrep 'typedef[ ]+[a-z_][ a-z_]*[ ](size|ptrdiff|wchar)_t' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} systypes" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^[ ]*\*[ ]*typedef unsigned int size_t;/N' \ -e 's/^\([ ]*\*[ ]*typedef unsigned int size_t;\n[ ]*\*\/\)/\1\ @@ -2283,26 +2224,26 @@ typedef __SIZE_TYPE__ size_t;\ #endif ' \ -e 's/typedef[ ][ ]*[a-z_][ a-z_]*[ ]wchar_t/typedef __WCHAR_TYPE__ wchar_t/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 78: Systypes_For_Aix + # Fix 75: Systypes_For_Aix # - case "$file" in ./sys/types.h ) - if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' $file`" -a \ - -z "`egrep '_GCC_SIZE_T' $file`" + case "${file}" in ./sys/types.h ) + if ( test -n "`egrep 'typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t' ${file}`" -a \ + -z "`egrep '_GCC_SIZE_T' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} systypes_for_aix" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/i\ #ifndef _GCC_SIZE_T\ @@ -2311,23 +2252,23 @@ typedef __SIZE_TYPE__ size_t;\ -e '/typedef[ ][ ]*[A-Za-z_][ A-Za-z_]*[ ]size_t/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 79: Sysv68_String + # Fix 76: Sysv68_String # - case "$file" in ./string.h ) + case "${file}" in ./string.h ) fixlist="${fixlist} sysv68_string" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/extern[ ]*int[ ]*strlen();/extern unsigned int strlen();/' \ -e 's/extern[ ]*int[ ]*ffs[ ]*(long);/extern int ffs(int);/' \ @@ -2340,24 +2281,24 @@ extern unsigned int\ \2/' \ -e '/^extern int$/N' \ -e 's/^extern int\(\n strlen(),\)/extern size_t\1/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 80: Sysz_Stdlib_For_Sun + # Fix 77: Sysz_Stdlib_For_Sun # - case "$file" in ./stdlib.h ) - case "$target_canonical" in *-sun-* | \ - m88k-*-sysv3* ) + case "${file}" in ./stdlib.h ) + case "$target_canonical" in *-sun* | \ + m88k-*sysv3* ) fixlist="${fixlist} sysz_stdlib_for_sun" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/int abort/void abort/g' \ -e 's/int free/void free/g' \ @@ -2372,9 +2313,9 @@ extern unsigned int\ -e '/typedef[ a-zA-Z_]*[ ]size_t[ ]*;/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for machine type test esac ;; # case end for file name test @@ -2382,14 +2323,14 @@ extern unsigned int\ # - # Fix 81: Sysz_Stdtypes_For_Sun + # Fix 78: Sysz_Stdtypes_For_Sun # - case "$file" in ./sys/stdtypes.h ) + case "${file}" in ./sys/stdtypes.h ) fixlist="${fixlist} sysz_stdtypes_for_sun" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/[ ]size_t.*;/i\ #ifndef _GCC_SIZE_T\ @@ -2412,109 +2353,109 @@ extern unsigned int\ -e '/[ ]wchar_t.*;/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 82: Tinfo_Cplusplus + # Fix 79: Tinfo_Cplusplus # - case "$file" in ./tinfo.h ) + case "${file}" in ./tinfo.h ) fixlist="${fixlist} tinfo_cplusplus" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/[ ]_cplusplus/ __cplusplus/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 83: Ultrix_Ansi_Compat + # Fix 80: Ultrix_Ansi_Compat # - case "$file" in ./ansi_compat.h ) - if ( test -n "`egrep 'ULTRIX' $file`" + case "${file}" in ./ansi_compat.h ) + if ( test -n "`egrep 'ULTRIX' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} ultrix_ansi_compat" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '1i\ /* This file intentionally left blank. */ ' \ -e '1,$d' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 84: Ultrix_Fix_Fixproto + # Fix 81: Ultrix_Fix_Fixproto # - case "$file" in ./sys/utsname.h ) - if ( test -n "`egrep 'ULTRIX' $file`" + case "${file}" in ./sys/utsname.h ) + if ( test -n "`egrep 'ULTRIX' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} ultrix_fix_fixproto" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^[ ]*extern[ ]*int[ ]*uname();$/i\ struct utsname; ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 85: Ultrix_Atof_Param + # Fix 82: Ultrix_Atof_Param # - case "$file" in ./math.h ) + case "${file}" in ./math.h ) fixlist="${fixlist} ultrix_atof_param" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@atof(\([ ]*char[ ]*\*[^)]*\))@atof(const \1)@' \ -e 's@inline int abs(int [a-z][a-z]*) {.*}@extern "C" int abs(int);@' \ -e 's@inline double abs(double [a-z][a-z]*) {.*}@@' \ -e 's@inline int sqr(int [a-z][a-z]*) {.*}@@' \ -e 's@inline double sqr(double [a-z][a-z]*) {.*}@@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 86: Ultrix_Const + # Fix 83: Ultrix_Const # - case "$file" in ./stdio.h ) + case "${file}" in ./stdio.h ) fixlist="${fixlist} ultrix_const" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@perror( char \*__s );@perror( const char *__s );@' \ -e 's@fputs( char \*__s,@fputs( const char *__s,@' \ @@ -2525,124 +2466,124 @@ struct utsname; -e 's@sscanf( char \*__s, char \*__format,@sscanf( const char *__s, const char *__format,@' \ -e 's@popen(char \*, char \*);@popen(const char *, const char *);@' \ -e 's@tempnam(char\*,char\*);@tempnam(const char*,const char*);@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 87: Ultrix_Ifdef + # Fix 84: Ultrix_Ifdef # - case "$file" in ./sys/file.h ) - if ( test -n "`egrep '#ifdef KERNEL' $file`" + case "${file}" in ./sys/file.h ) + if ( test -n "`egrep '#ifdef KERNEL' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} ultrix_ifdef" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/#ifdef KERNEL/#if defined(KERNEL)/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 88: Ultrix_Nested_Cmnt + # Fix 85: Ultrix_Nested_Cmnt # - case "$file" in ./rpc/svc.h ) + case "${file}" in ./rpc/svc.h ) fixlist="${fixlist} ultrix_nested_cmnt" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's@^\( \* int protocol; \)/\*@\1*/ /*@' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 89: Ultrix_Static + # Fix 86: Ultrix_Static # - case "$file" in ./machine/cpu.h ) - if ( test -n "`egrep '#include \"r[34]_cpu' $file`" + case "${file}" in ./machine/cpu.h ) + if ( test -n "`egrep '#include \"r[34]_cpu' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} ultrix_static" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^static struct tlb_pid_state/struct tlb_pid_state/' \ -e 's/^#include "r3_cpu\.h"$/#include /' \ -e 's/^#include "r4_cpu\.h"$/#include /' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 90: Undefine_Null + # Fix 87: Undefine_Null # - if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' $file`" -a \ - -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' $file`" + if ( test -n "`egrep '^#[ ]*define[ ]*[ ]NULL[ ]' ${file}`" -a \ + -z "`egrep '#[ ]*(ifn|un)def[ ]*[ ]NULL($|[ ])' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} undefine_null" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/^#[ ]*define[ ][ ]*NULL[ ]/i\ #undef NULL ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' # - # Fix 91: Va_I960_Macro + # Fix 88: Va_I960_Macro # - case "$file" in ./arch/i960/archI960.h ) - if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' $file`" + case "${file}" in ./arch/i960/archI960.h ) + if ( test -n "`egrep '__(vsiz|vali|vpad|alignof__)' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} va_i960_macro" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/__vsiz/__vxvsiz/' \ -e 's/__vali/__vxvali/' \ -e 's/__vpad/__vxvpad/' \ -e 's/__alignof__/__vxalignof__/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 92: Void_Null + # Fix 89: Void_Null # - case "$file" in ./curses.h | \ + case "${file}" in ./curses.h | \ ./dbm.h | \ ./locale.h | \ ./stdio.h | \ @@ -2653,34 +2594,34 @@ struct utsname; ./sys/dir.h | \ ./sys/param.h | \ ./sys/types.h ) - if ( test -n "`egrep '#[ ]*define[ ][ ]*NULL[ ].*void' $file`" + if ( test -n "`egrep '#[ ]*define[ ][ ]*NULL[ ].*void' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} void_null" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/^#[ ]*define[ ]*NULL[ ]*((void[ ]*\*)0)/#define NULL 0/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 93: Vxworks_Gcc_Problem + # Fix 90: Vxworks_Gcc_Problem # - case "$file" in ./types/vxTypesBase.h ) - if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' $file`" + case "${file}" in ./types/vxTypesBase.h ) + if ( test -n "`egrep '__GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} vxworks_gcc_problem" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/#ifdef __GNUC_TYPEOF_FEATURE_BROKEN_USE_DEFAULT_UNTIL_FIXED__/#if 1/' \ -e '/[ ]size_t/i\ @@ -2704,73 +2645,73 @@ struct utsname; -e '/[ ]wchar_t/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 94: Vxworks_Needs_Vxtypes + # Fix 91: Vxworks_Needs_Vxtypes # - case "$file" in ./time.h ) - if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' $file`" + case "${file}" in ./time.h ) + if ( test -n "`egrep 'uint_t[ ][ ]*_clocks_per_sec' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} vxworks_needs_vxtypes" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/uint_t/unsigned int/' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 95: Vxworks_Needs_Vxworks + # Fix 92: Vxworks_Needs_Vxworks # - case "$file" in ./sys/stat.h ) - if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' $file`" -a \ - '(' -r types/vxTypesOld.h ')' -a \ - '(' -n "`fgrep '#include' $file`" ')' -a \ - '(' -n "`fgrep ULONG $file`" ')' + case "${file}" in ./sys/stat.h ) + if ( test -n "`egrep '#[ ]define[ ][ ]*__INCstath' ${file}`" -a \ + '(' -r types/vxTypesOld.h ')' -a \ + '(' -n "`egrep '#include' $file`" ')' -a \ + '(' -n "`egrep ULONG $file`" ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} vxworks_needs_vxworks" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/#[ ]define[ ][ ]*__INCstath/a\ #include ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 96: Vxworks_Time + # Fix 93: Vxworks_Time # - case "$file" in ./time.h ) - if ( test -n "`egrep 'VOIDFUNCPTR' $file`" -a \ - '(' -r vxWorks.h ')' + case "${file}" in ./time.h ) + if ( test -n "`egrep 'VOIDFUNCPTR' ${file}`" -a \ + '(' -r vxWorks.h ')' ) > /dev/null 2>&1 ; then fixlist="${fixlist} vxworks_time" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/VOIDFUNCPTR/i\ #ifndef __gcc_VOIDFUNCPTR_defined\ @@ -2783,25 +2724,25 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ #endif ' \ -e 's/VOIDFUNCPTR/__gcc_VOIDFUNCPTR/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 97: X11_Class + # Fix 94: X11_Class # - case "$file" in ./X11/ShellP.h ) - if ( test -z "`egrep '__cplusplus' $file`" + case "${file}" in ./X11/ShellP.h ) + if ( test -z "`egrep '__cplusplus' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} x11_class" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/char \*class;/i\ #ifdef __cplusplus\ @@ -2811,46 +2752,46 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ -e '/char \*class;/a\ #endif ' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 98: X11_Class_Usage + # Fix 95: X11_Class_Usage # - case "$file" in ./Xm/BaseClassI.h ) - if ( test -z "`egrep '__cplusplus' $file`" + case "${file}" in ./Xm/BaseClassI.h ) + if ( test -z "`egrep '__cplusplus' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} x11_class_usage" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's/ class[)]/ c_class)/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 99: X11_New + # Fix 96: X11_New # - case "$file" in ./Xm/Traversal.h ) - if ( test -z "`egrep '__cplusplus' $file`" + case "${file}" in ./Xm/Traversal.h ) + if ( test -z "`egrep '__cplusplus' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} x11_new" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e '/Widget old, new;/i\ #ifdef __cplusplus\ @@ -2861,164 +2802,188 @@ typedef void (*__gcc_VOIDFUNCPTR) ();\ #endif ' \ -e 's/Widget new,/Widget c_new,/g' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 100: X11_Sprintf + # Fix 97: X11_Sprintf # - case "$file" in ./X11*/Xmu.h ) + case "${file}" in ./X11*/Xmu.h ) fixlist="${fixlist} x11_sprintf" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi sed -e 's,^extern char \* sprintf();$,#ifndef __STDC__\ extern char * sprintf();\ #endif /* !defined __STDC__ */,' \ - < $infile > ${DESTDIR}/$file. - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + < $infile > ${DESTFILE}. + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} ;; # case end for file name test esac # - # Fix 101: Zzz_Ki_Iface + # Fix 98: Zzz_Ki_Iface # - case "$file" in ./sys/ki_iface.h ) - if ( test -n "`egrep 'These definitions are for HP Internal developers' $file`" + case "${file}" in ./sys/ki_iface.h ) + if ( test -n "`egrep 'These definitions are for HP Internal developers' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} zzz_ki_iface" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to HP-UX <$file>" >&2 + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 102: Zzz_Ki + # Fix 99: Zzz_Ki # - case "$file" in ./sys/ki.h ) - if ( test -n "`egrep '11.00 HP-UX LP64' $file`" + case "${file}" in ./sys/ki.h ) + if ( test -n "`egrep '11.00 HP-UX LP64' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} zzz_ki" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to HP-UX <$file>" >&2 + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 103: Zzz_Ki_Calls + # Fix 100: Zzz_Ki_Calls # - case "$file" in ./sys/ki_calls.h ) - if ( test -n "`egrep 'KI_MAX_PROCS is an arbitrary number' $file`" + case "${file}" in ./sys/ki_calls.h ) + if ( test -n "`egrep 'KI_MAX_PROCS is an arbitrary number' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} zzz_ki_calls" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to HP-UX <$file>" >&2 + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 104: Zzz_Ki_Defs + # Fix 101: Zzz_Ki_Defs # - case "$file" in ./sys/ki_defs.h ) - if ( test -n "`egrep 'Kernel Instrumentation Definitions' $file`" + case "${file}" in ./sys/ki_defs.h ) + if ( test -n "`egrep 'Kernel Instrumentation Definitions' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} zzz_ki_defs" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to HP-UX <$file>" >&2 + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac # - # Fix 105: Zzz_Time + # Fix 102: Zzz_Bad_Fixes + # + case "${file}" in ./sundev/ipi_error.h ) + fixlist="${fixlist} + zzz_bad_fixes" + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 +rm -f ${DESTDIR}/$file ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp + + # 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}/fixinc.tmp + then continue ; fi + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} + ;; # case end for file name test + esac + + + # + # Fix 103: Zzz_Time # - case "$file" in ./sys/time.h ) - if ( test -n "`egrep 'For CASPEC, look in' $file`" + case "${file}" in ./sys/time.h ) + if ( test -n "`egrep 'For CASPEC, look in' ${file}`" ) > /dev/null 2>&1 ; then fixlist="${fixlist} zzz_time" - if [ ! -r ${DESTDIR}/$file ] - then infile=$file - else infile=${DESTDIR}/$file ; fi - ( echo "Removing incorrect fix to HP-UX <$file>" >&2 + if [ ! -r ${DESTFILE} ] + then infile=${file} + else infile=${DESTFILE} ; fi + ( echo "Removing incorrect fix to <$file>" >&2 rm -f ${DESTDIR}/$file ${DESTDIR}/$file. -cat > /dev/null ) < $infile > ${DESTDIR}/$file. +cat > /dev/null ) < $infile > ${DESTDIR}/FIXINC.tmp # 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}/fixinc.tmp then continue ; fi - - mv -f ${DESTDIR}/$file. ${DESTDIR}/$file + rm -f ${DESTFILE} + mv -f ${DESTDIR}/fixinc.tmp ${DESTFILE} fi # end of selection 'if' ;; # case end for file name test esac @@ -3026,21 +2991,23 @@ cat > /dev/null ) < $infile > ${DESTDIR}/$file. # THEN ensure the output is gone # ELSE look for local directory include syntax # - if ( test ! -f ${DESTDIR}/$file || \ - cmp $file ${DESTDIR}/$file ) > /dev/null 2>&1 + if ( test ! -f ${DESTFILE} || \ + cmp ${file} ${DESTFILE} ) > /dev/null 2>&1 then - rm -f ${DESTDIR}/$file + rm -f ${DESTFILE} else - echo "Fixed $file:${fixlist}" + echo "Fixed ${file}:${fixlist}" # Find any include directives that use "file". # + dir=`echo ${file} | sed -e s';/[^/]*$;;'` + ddir=`echo ${DESTDIR} | sed 's;/[^/]*$;;'`/$dir + for include in ` - egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${DESTDIR}/$file | - sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'` + egrep '^[ ]*#[ ]*include[ ]*"[^/]' ${DESTFILE} | + sed -e 's/^[ ]*#[ ]*include[ ]*"\([^"]*\)".*$/\1/'` do - dir=`echo $file | sed -e s'|/[^/]*$||'` - required="$required ${SRCDIR} $dir/$include ${DESTDIR}/$dir/$include" + required="$required ${SRCDIR} $dir/$include ${ddir}/$include" done fi done # for file in $files @@ -3089,8 +3056,8 @@ find . -name DONE -exec rm -f '{}' ';' echo 'Removing unneeded directories:' cd $LIB -files=`find . -type d -print | sort -r` -for file in $files; do +all_dirs=`find . -type d -print | sort -r` +for file in $all_dirs; do rmdir $LIB/$file > /dev/null 2>&1 | : done -- 2.30.2