diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-02-25 02:20:56 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 1994-02-25 02:20:56 +0000 |
commit | bcb58dfcd5aea6acf6745dad392e9e1c7fb637a3 (patch) | |
tree | 889a80e23cf466d00de968087e4c84b9f140b3b7 /gcc/fixinc.sco | |
parent | a69b6c05eb53bcd87c37b88b66ec83fa2ff8b07d (diff) | |
download | gcc-bcb58dfcd5aea6acf6745dad392e9e1c7fb637a3.zip gcc-bcb58dfcd5aea6acf6745dad392e9e1c7fb637a3.tar.gz gcc-bcb58dfcd5aea6acf6745dad392e9e1c7fb637a3.tar.bz2 |
In <prototypes.h>, fix prototypes of getcwd and link.
From-SVN: r6620
Diffstat (limited to 'gcc/fixinc.sco')
-rwxr-xr-x | gcc/fixinc.sco | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/fixinc.sco b/gcc/fixinc.sco index 97699a1..1b90331 100755 --- a/gcc/fixinc.sco +++ b/gcc/fixinc.sco @@ -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 |