OSDN Git Service

Tweaks for LynxOS 2.2.2
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Sep 1994 15:38:17 +0000 (15:38 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 22 Sep 1994 15:38:17 +0000 (15:38 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8120 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fixincludes

index 7bee497..ae7e184 100755 (executable)
@@ -1466,7 +1466,7 @@ fi
 
 if [ -r ${LIB}/$file ]; then
   echo Fixing $file
-  sed -e '/#define[    ][      ]*void[         ]int/d' \
+  sed -e '/#[  ]*define[       ][      ]*void[         ]int/d' \
      ${LIB}/$file > ${LIB}/${file}.sed
   rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
     if cmp $file ${LIB}/$file >/dev/null 2>&1; then
@@ -1745,6 +1745,24 @@ for file in time.h sys/time.h ; do
   fi
 done
 
+# Fix fcntl prototype in fcntl.h on LynxOS.
+file=fcntl.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+  cp $file ${LIB}/$file >/dev/null 2>&1 || echo "Can't copy $file"
+  chmod +w ${LIB}/$file 2>/dev/null
+  chmod a+r ${LIB}/$file 2>/dev/null
+fi
+
+if [ -r ${LIB}/$file ]; then
+  echo Fixing $file, fcntl declaration
+  sed -e 's/\(fcntl.*(int, int, \)int)/\1...)/' \
+    ${LIB}/$file > ${LIB}/${file}.sed
+  rm -f ${LIB}/$file; mv ${LIB}/${file}.sed ${LIB}/$file
+  if cmp $file ${LIB}/$file >/dev/null 2>&1; then
+    rm -f ${LIB}/$file
+  fi
+fi
+
 if $LINKS; then
   echo 'Making internal symbolic non-directory links'
   cd ${INPUT}