⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 fixinc.svr4

📁 gcc-2.95.3 Linux下最常用的C编译器
💻 SVR4
📖 第 1 页 / 共 3 页
字号:
  fi  rm -f /tmp/$base /tmp/$base.sedfi# Disable apparent native compiler optimization cruft in SVR4.2 <string.h># that is visible to any ANSI compiler using this include.  Simply# delete the lines that #define some string functions to internal forms.file=string.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  cp $file_to_fix /tmp/$base  chmod +w /tmp/$base  sed -e '/#define.*__std_hdr_/d' /tmp/$base > /tmp/$base.sed  if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base.sed ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$base /tmp/$base.sedfi# Delete any #defines of `__i386' which may be present in <ieeefp.h>.  They# tend to conflict with the compiler's own definition of this symbol.  (We# will use the compiler's definition.)# Likewise __sparc, for Solaris, and __i860, and a few others# (guessing it is necessary for all of them).file=ieeefp.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  cp $file_to_fix /tmp/$base  chmod +w /tmp/$base  sed -e '/#define[ 	]*__i386 /d' -e '/#define[ 	]*__sparc /d' \      -e '/#define[ 	]*__i860 /d' -e '/#define[ 	]*__m88k /d' \      -e '/#define[ 	]*__mips /d' -e '/#define[ 	]*__m68k /d' \     /tmp/$base > /tmp/$base.sed  if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix     rm -f ${LIB}/$file    cp /tmp/$base.sed ${LIB}/$file     chmod a+r ${LIB}/$file  fi  rm -f /tmp/$base /tmp/$base.sed fi # Add a #define of _SIGACTION_ into <sys/signal.h>.# Also fix types of SIG_DFL, SIG_ERR, SIG_IGN, and SIG_HOLD.file=sys/signal.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  cp $file_to_fix /tmp/$base  chmod +w /tmp/$base  sed -e '/^struct sigaction {/c\#define _SIGACTION_\struct  sigaction  {' \  -e '1,$s/(void *(\*)())/(void (*)(int))/' /tmp/$base > /tmp/$base.sed  if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base.sed ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$base /tmp/$base.sedfi# Fix declarations of `makedev', `major', and `minor' in <sys/mkdev.h>.file=sys/mkdev.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  cp $file_to_fix /tmp/$base  chmod +w /tmp/$base  sed -e '/^dev_t makedev(const/c\static dev_t makedev(const major_t, const minor_t);' \  -e '/^dev_t makedev()/c\static dev_t makedev();' \  -e '/^major_t major(const/c\static major_t major(const dev_t);' \  -e '/^major_t major()/c\static major_t major();' \  -e '/^minor_t minor(const/c\static minor_t minor(const dev_t);' \  -e '/^minor_t minor()/c\static minor_t minor();' /tmp/$base > /tmp/$base.sed  if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base.sed ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$base /tmp/$base.sedfi# Fix reference to NMSZ in <sys/adv.h>.file=sys/adv.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  sed 's/\[NMSZ\]/\[RFS_NMSZ\]/g' $file_to_fix > /tmp/$base  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$basefi# Fix reference to NC_NPI_RAW in <sys/netcspace.h>.  Also fix types of# array initializers.file=sys/netcspace.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  sed 's/NC_NPI_RAW/NC_TPI_RAW/g' $file_to_fix \    | sed 's/NC_/(unsigned long) NC_/' > /tmp/$base  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$basefi# Conditionalize all of <fs/rfs/rf_cache.h> on _KERNEL being defined.file=fs/rfs/rf_cache.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/erec.h> on _KERNEL being defined.file=sys/erec.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/err.h> on _KERNEL being defined.file=sys/err.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/char.h> on _KERNEL being defined.file=sys/char.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/getpages.h> on _KERNEL being defined.file=sys/getpages.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/map.h> on _KERNEL being defined.file=sys/map.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/cmn_err.h> on _KERNEL being defined.file=sys/cmn_err.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize all of <sys/kdebugger.h> on _KERNEL being defined.file=sys/kdebugger.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep _KERNEL $file_to_fix > /dev/null; then    true  else    echo '#ifdef _KERNEL' > /tmp/$base    cat $file_to_fix >> /tmp/$base    echo '#endif /* defined(_KERNEL) */' >> /tmp/$base    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file    rm -f /tmp/$base  fifi# Conditionalize some of <netinet/in.h> on _KERNEL being defined.# This has been taken out because it breaks on some versions of# DYNIX/ptx, and it does not seem to do much good on any system.# file=netinet/in.h# base=`basename $file`# if [ -r ${LIB}/$file ]; then#   file_to_fix=${LIB}/$file# else#   if [ -r ${INPUT}/$file ]; then#     file_to_fix=${INPUT}/$file#   else#     file_to_fix=""#   fi# fi# if [ \! -z "$file_to_fix" ]; then#   echo Checking $file_to_fix#   if grep _KERNEL $file_to_fix > /dev/null; then#     true#   else#     sed -e '/#ifdef INKERNEL/i\# #ifdef _KERNEL# ' \#     -e '/#endif[ 	]*\/\* INKERNEL \*\//a\# #endif /* _KERNEL */# ' \#     $file_to_fix > ${LIB}/${file}.sed#     rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file#     echo Fixed $file_to_fix#   fi# fi# Conditionalize some of <sys/endian.h> on __GNUC__ and __GNUG__.file=sys/endian.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  if grep __GNUC__ $file_to_fix > /dev/null; then    true  else    sed -e '/#	ifdef	__STDC__/i\#   if !defined (__GNUC__) && !defined (__GNUG__)' \    -e '/#		include	<sys\/byteorder.h>/s/		/   /'\    -e '/#   include	<sys\/byteorder.h>/i\#   endif /* !defined (__GNUC__) && !defined (__GNUG__) */'\    $file_to_fix > ${LIB}/${file}.sed    rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file    echo Fixed $file_to_fix  fifi# Commented out because tmcconne@sedona.intel.com says we don't clearly need it# and the text in types.h is not erroneous.## In sys/types.h, don't name the enum for booleans.##file=sys/types.h#base=`basename $file`#if [ -r ${LIB}/$file ]; then#  file_to_fix=${LIB}/$file#else#  if [ -r ${INPUT}/$file ]; then#    file_to_fix=${INPUT}/$file#  else#    file_to_fix=""#  fi#fi#if [ \! -z "$file_to_fix" ]; then#  echo Checking $file_to_fix#  if grep "enum boolean" $file_to_fix > /dev/null; then#    sed -e 's/enum boolean/enum/' ${LIB}/$file > ${LIB}/${file}.sed#    rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file#    echo Fixed $file_to_fix#  else#    true#  fi#fi# Remove useless extern keyword from struct forward declarations in# <sys/stream.h> and <sys/strsubr.h>file=sys/stream.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  sed -e '    s/extern struct stdata;/struct stdata;/g    s/extern struct strevent;/struct strevent;/g  ' $file_to_fix > /tmp/$base   if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$basefifile=sys/strsubr.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  sed -e '    s/extern struct strbuf;/struct strbuf;/g    s/extern struct uio;/struct uio;/g    s/extern struct thread;/struct thread;/g    s/extern struct proc;/struct proc;/g  ' $file_to_fix > /tmp/$base   if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file    chmod a+r ${LIB}/$file  fi  rm -f /tmp/$basefi# Put storage class at start of decl, to avoid warning.file=rpc/types.hbase=`basename $file`if [ -r ${LIB}/$file ]; then  file_to_fix=${LIB}/$fileelse  if [ -r ${INPUT}/$file ]; then    file_to_fix=${INPUT}/$file  else    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  sed -e '    s/const extern/extern const/g  ' $file_to_fix > /tmp/$base   if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    true  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -