OSDN Git Service

In <prototypes.h>, fix prototypes of getcwd and link.
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Feb 1994 02:20:56 +0000 (02:20 +0000)
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 25 Feb 1994 02:20:56 +0000 (02:20 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6620 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fixinc.sco

index 97699a1..1b90331 100755 (executable)
@@ -227,6 +227,34 @@ if [ \! -z "$file_to_fix" ]; then
   rm -f /tmp/$base
 fi
 
+# Fix third broken decl of getcwd on SCO.  Also fix incorrect decl of
+# link.
+file=prototypes.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
+  sed -e 's/getcwd(char \*, int)/getcwd(char *, size_t)/' $file_to_fix \
+    | sed -e 's/const  int     link(const char \*, char \*)/extern  int        link(const char *, const char *)/' > /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/$base
+fi
+
 # Fix an error in this file: the #if says _cplusplus, not the double
 # underscore __cplusplus that it should be
 file=tinfo.h