summaryrefslogtreecommitdiff
path: root/gcc/fixinc.sco
diff options
context:
space:
mode:
authorian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-02-22 16:01:26 +0000
committerian <ian@138bc75d-0d04-0410-961f-82ee72b054a4>1994-02-22 16:01:26 +0000
commitdf04b1d0e80d71e3b2127f9c505243efef7477ac (patch)
treed551ba6484c8e98bd758bc028db77ae4e6a487da /gcc/fixinc.sco
parent36652f3f482458294698b8d37fac0c774b36cab9 (diff)
downloadgcc-df04b1d0e80d71e3b2127f9c505243efef7477ac.tar.gz
Fix prototype declaration of utime in <sys/times.h>.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@6608 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc.sco')
-rwxr-xr-xgcc/fixinc.sco18
1 files changed, 18 insertions, 0 deletions
diff --git a/gcc/fixinc.sco b/gcc/fixinc.sco
index 4711c03dcec..97699a177fa 100755
--- a/gcc/fixinc.sco
+++ b/gcc/fixinc.sco
@@ -246,6 +246,24 @@ if [ -r ${LIB}/$file ]; then
fi
fi
+# Fix prototype declaration of utime in sys/times.h. In 3.2v4.0 the
+# const is missing.
+file=sys/times.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, utime prototype
+ sed -e 's/(const char \*, struct utimbuf \*);/(const char *, const struct utimbuf *);/' ${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 ${LIB}/$file
+ fi
+fi
+
echo 'Removing unneeded directories:'
cd $LIB
files=`find . -type d -print | sort -r`