OSDN Git Service

(sys/stream.h, sys/strsubr.h): Delete spurious `extern'
authorrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 1992 04:37:09 +0000 (04:37 +0000)
committerrms <rms@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 14 Oct 1992 04:37:09 +0000 (04:37 +0000)
in various structure definitions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2452 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/fixinc.svr4

index 7d3e9f8..0037506 100755 (executable)
@@ -862,6 +862,57 @@ if [ \! -z "$file_to_fix" ]; then
   fi
 fi
 
+# Remove useless extern keyword from struct forward declarations in
+# <sys/stream.h> and <sys/strsubr.h>
+
+file=sys/stream.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/extern struct \(stdata\|strevent\);/struct \1;/' $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/$base
+fi
+
+file=sys/strsubr.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/extern struct \(strbuf\|uio\|thread\|proc\);/struct \1;/' $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/$base
+fi
+
 # Convert functions to prototype form, and fix arg names in <sys/stat.h>.
 
 file=sys/stat.h