summaryrefslogtreecommitdiffstats
path: root/gcc/fixinc.svr4
diff options
context:
space:
mode:
authorbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>1994-05-18 17:54:24 +0000
committerbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>1994-05-18 17:54:24 +0000
commit227e62b633b3183103e419b03889054eaac7adda (patch)
treefb97555a12d8856ce9f6007a90951616f284532b /gcc/fixinc.svr4
parent469fc5fc4084fd17f7b48e7f76aba5b1293f8646 (diff)
downloadppe42-gcc-227e62b633b3183103e419b03889054eaac7adda.tar.gz
ppe42-gcc-227e62b633b3183103e419b03889054eaac7adda.zip
* fixinc.svr4: Avoid the SVR4 typedef of bool in curses.h when
compiling for C++, since g++ now supports it as an official typename. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@7327 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fixinc.svr4')
-rwxr-xr-xgcc/fixinc.svr433
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/fixinc.svr4 b/gcc/fixinc.svr4
index de73ffc6075..93adb9feb27 100755
--- a/gcc/fixinc.svr4
+++ b/gcc/fixinc.svr4
@@ -469,6 +469,39 @@ extern\
rm -f /tmp/$base /tmp/$base.sed
fi
+# Avoid the definition of the bool type in the Solaris 2.x curses.h when using
+# g++, since it's now an official type in the C++ language.
+# CYGNUS LOCAL
+file=curses.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
+ cp $file_to_fix /tmp/$base
+ chmod +w /tmp/$base
+ sed -e 's,^typedef[ ]char[ ]bool;$,#ifndef __cplusplus\
+typedef char bool;\
+#endif /* !defined __cplusplus */,' /tmp/$base > /tmp/$base.sed
+ if cmp $file_to_fix /tmp/$base.sed >/dev/null 2>&1; then \
+ true
+ else
+ echo Fixed $file_to_fix
+ rm -f ${LIB}/$file
+ cp /tmp/$base.sed ${LIB}/$file
+ chmod a+r ${LIB}/$file
+ fi
+ rm -f /tmp/$base /tmp/$base.sed
+fi
+
# Add a `static' declaration of `getrnge' into <regexp.h>.
# Don't do this if there is already a `static void getrnge' declaration
OpenPOWER on IntegriCloud