aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRobert Lipe <robertl@dgii.com>1998-09-03 09:43:46 +0000
committerRobert Lipe <robertl@gcc.gnu.org>1998-09-03 09:43:46 +0000
commitd21415f07473fb08d00a08ed307b5ced28ef2f9c (patch)
tree60b5b6ae3738c57ca064a4eb85967814f1b11a2c /gcc
parentaecb033930502967ebfddef9067d203121ac6293 (diff)
downloadgcc-d21415f07473fb08d00a08ed307b5ced28ef2f9c.zip
gcc-d21415f07473fb08d00a08ed307b5ced28ef2f9c.tar.gz
gcc-d21415f07473fb08d00a08ed307b5ced28ef2f9c.tar.bz2
fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h and term.h from fixinc.wrap.
* fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h and term.h from fixinc.wrap. From-SVN: r22206
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rwxr-xr-xgcc/fixinc.sco33
2 files changed, 38 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9bf5816..0d89f27 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+Thu Sep 3 11:41:40 1998 Robert Lipe <robertl@dgii.com>
+
+ * fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h
+ and term.h from fixinc.wrap.
+
Thu Sep 3 09:47:31 1998 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
* aclocal.m4 (GCC_HEADER_STRING): New macro to detect if it is
diff --git a/gcc/fixinc.sco b/gcc/fixinc.sco
index c0ca782..205a882 100755
--- a/gcc/fixinc.sco
+++ b/gcc/fixinc.sco
@@ -369,6 +369,39 @@ extern "C"\
fi
fi
+# This fix has the regex modified from the from fixinc.wrap
+# Avoid the definition of the bool type in the following files when using
+# g++, since it's now an official type in the C++ language.
+for file in term.h tinfo.h
+do
+ if [ -r $INPUT/$file ]; then
+ echo Checking $INPUT/$file
+ w='[ ]'
+ if grep "typedef$w.*char$w.*bool$w*;" $INPUT/$file >/dev/null
+ then
+ echo Fixed $file
+ rm -f $LIB/$file
+ cat <<'__EOF__' >$LIB/$file
+#ifndef _CURSES_H_WRAPPER
+#ifdef __cplusplus
+# define bool __curses_bool_t
+#endif
+#include_next <curses.h>
+#ifdef __cplusplus
+# undef bool
+#endif
+#define _CURSES_H_WRAPPER
+#endif /* _CURSES_H_WRAPPER */
+__EOF__
+ # Define _CURSES_H_WRAPPER at the end of the wrapper, not the start,
+ # so that if #include_next gets another instance of the wrapper,
+ # this will follow the #include_next chain until we arrive at
+ # the real <curses.h>.
+ chmod a+r $LIB/$file
+ fi
+ fi
+done
+
echo 'Removing unneeded directories:'
cd $LIB
files=`find . -type d -print | sort -r`