OSDN Git Service

(rpc/auth.h, rpc/xdr.h): Declare structures before using them in
authorkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 1993 02:09:32 +0000 (02:09 +0000)
committerkenner <kenner@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 22 Dec 1993 02:09:32 +0000 (02:09 +0000)
prototypes, for Irix 4.0.5.
(rpc/rpc.h): Avoid a nested comment on Ultrix 4.3.

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

gcc/fixincludes

index 5cab47d..65f4879 100755 (executable)
@@ -872,6 +872,48 @@ for file in elf_abi.h elf.h; do
   fi
 done
 
+# IRIX 4.0.5 <rpc/auth.h> uses struct sockaddr in prototype without
+# previous definition.
+file=rpc/auth.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+  mkdir ${LIB}/rpc 2>/dev/null
+  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, undefined type
+  sed -e '/authdes_create.*struct sockaddr/i\
+struct sockaddr;' \
+    ${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
+
+# IRIX 4.0.5 <rpc/xdr.h> uses struct __file_s in prototype without previous
+# definition.
+file=rpc/xdr.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+  mkdir ${LIB}/rpc 2>/dev/null
+  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, undefined type
+  sed -e '/xdrstdio_create.*struct __file_s/i\
+struct __file_s;' \
+    ${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
+
 # Same problem with a file from SunOS 4.1.3 : a header file containing
 # the string "//" embedded in "/**/"
 file=sbusdev/audiovar.h
@@ -1109,6 +1151,24 @@ if [ -r ${LIB}/$file ]; then
   fi
 fi
 
+file=rpc/rpc.h
+if [ -r $file ] && [ ! -r ${LIB}/$file ]; then
+  mkdir ${LIB}/rpc 2>/dev/null
+  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, nested comment
+  sed -e 's@^\(/\*.*rpc/auth_des.h>.*\)/\*@\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
+
 # In limits.h, put #ifndefs around things that are supposed to be defined
 # in float.h to avoid redefinition errors if float.h is included first.
 # On HP/UX this patch does not work, because on HP/UX limits.h uses