]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
[multiple changes]
authorJeff Law <law@gcc.gnu.org>
Mon, 9 Nov 1998 21:46:48 +0000 (14:46 -0700)
committerJeff Law <law@gcc.gnu.org>
Mon, 9 Nov 1998 21:46:48 +0000 (14:46 -0700)
Mon Nov  9 22:43:57 1998  Jean-Pierre Radley <jpr@jpr.com>
        * fixinc.sco: Paramaterize #include_next values.
        * fixinc/fixinc.sco: Likewise.
Mon Nov  9 22:43:57 1998  Robert Lipe   <robertl@dgii.com>
        * fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h
        and term.h from fixinc.wrap.

From-SVN: r23588

gcc/ChangeLog
gcc/fixinc.sco

index c67c4c6c7a5bff8539df1aade94609dfcf691af9..4820a7784c3c77ccb262398caa5fd1e1806edcc4 100644 (file)
@@ -1,3 +1,13 @@
+Mon Nov  9 22:43:57 1998  Jean-Pierre Radley <jpr@jpr.com>
+
+        * fixinc.sco: Paramaterize #include_next values.
+        * fixinc/fixinc.sco: Likewise.
+
+Mon Nov  9 22:43:57 1998  Robert Lipe   <robertl@dgii.com>
+
+        * fixinc.sco: Borrow code to wrap 'bool' typedefs from tinfo.h
+        and term.h from fixinc.wrap.
+
 Thu Nov  5 07:57:45 EST 1998  Andrew MacLeod  <amacleod@cygnus.com>
 
        * except.c (expand_fixup_region_end): Make sure outer context labels
index c0ca7826d7fadf0e471163cd3afe2eacddbb3613..5caaf7fc385404ba60aa5e87e464919af8ceba18 100755 (executable)
@@ -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 <$file>
+#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 system include file.
+      chmod a+r $LIB/$file
+    fi
+  fi
+done
+
 echo 'Removing unneeded directories:'
 cd $LIB
 files=`find . -type d -print | sort -r`