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

📄 fixinc.svr4

📁 早期freebsd实现
💻 SVR4
📖 第 1 页 / 共 3 页
字号:
    file_to_fix=""  fifiif [ \! -z "$file_to_fix" ]; then  echo Checking $file_to_fix  cp $file_to_fix /tmp/$base  chmod +w /tmp/$base  ex /tmp/$base <<EOF  /^extern int ftw(const/c#if !defined(_STYPES)static#elseextern#endif  int ftw(const char *, int (*)(const char *, const struct stat *, int), int);.  /^extern int nftw/c#if defined(_STYPES)static#elseextern#endif  int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *),int, int);.  /^extern int ftw(),/c#if !defined(_STYPES)static#elseextern#endif  int ftw();#if defined(_STYPES)static#elseextern#endif  int nftw();.  wqEOF  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file  fi  rm -f /tmp/$basefi# Add a `static' declaration of `getrnge' into <regexp.h>.# Don't do this if there is already a `static void getrnge' declaration# present, since this would cause a redeclaration error.  Solaris 2.x has# such a declaration.file=regexp.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 "static void getrnge" $file_to_fix > /dev/null; then    true  else    cp $file_to_fix /tmp/$base    chmod +w /tmp/$base    ex /tmp/$base <<EOF    /^static int[ 	]*size;/cstatic int	size ;static int getrnge ();.    wqEOF    if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \      No change needed in $file_to_fix    else      echo Fixed $file_to_fix      rm -f ${LIB}/$file      cp /tmp/$base ${LIB}/$file    fi  fi  rm -f /tmp/$basefi# 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 the #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  ex /tmp/$base <<EOF  g/#define.*__std_hdr_/d  wqEOF  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file  fi  rm -f /tmp/$basefi# 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  ex /tmp/$base <<EOF  /^struct sigaction {/c#define _SIGACTION_struct  sigaction  {.  1,\$s/(void *(\*)())/(void (*)(int))/  wqEOF  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file  fi  rm -f /tmp/$basefi# 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  ex /tmp/$base <<EOF  /^dev_t makedev(const/cstatic dev_t makedev(const major_t, const minor_t);.  /^dev_t makedev()/cstatic dev_t makedev();.  /^major_t major(const/cstatic major_t major(const dev_t);.  /^major_t major()/cstatic major_t major();.  /^minor_t minor(const/cstatic minor_t minor(const dev_t);.  /^minor_t minor()/cstatic minor_t minor();.  wqEOF  if cmp $file_to_fix /tmp/$base >/dev/null 2>&1; then \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${LIB}/$file  fi  rm -f /tmp/$basefi# 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 \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${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 \    echo No change needed in $file_to_fix  else    echo Fixed $file_to_fix    rm -f ${LIB}/$file    cp /tmp/$base ${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    echo No change needed in $file_to_fix  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    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    echo No change needed in $file_to_fix  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    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    echo No change needed in $file_to_fix  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    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    echo No change needed in $file_to_fix  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    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    echo No change needed in $file_to_fix  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    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    echo No change needed in $file_to_fix

⌨️ 快捷键说明

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