* fixinc.irix: Add curses.h handling from fixinc.wrap.
authorJason Merrill <jason@yorick.cygnus.com>
Mon, 24 Aug 1998 00:54:37 +0000 (00:54 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Mon, 24 Aug 1998 00:54:37 +0000 (20:54 -0400)
From-SVN: r21923

gcc/ChangeLog
gcc/fixinc.irix

index 38a135e8da90d022b5d250405c67c5309f147fb0..79b54c3540bc345a9fe460fdd04c68055d2a107c 100644 (file)
@@ -1,3 +1,13 @@
+Mon Aug 24 00:53:53 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * fixinc.irix: Add curses.h handling from fixinc.wrap.
+
+Fri Aug 14 14:12:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * c-common.c (combine_strings): Also set TREE_READONLY.
+       Change warn_write_strings to flag_const_strings.
+       * c-decl.c, c-tree.h: Likewise.
+
 Sun Aug 23 18:39:11 1998  David S. Miller  <davem@pierdol.cobaltmicro.com>
 
        * config/sparc/sparc.c (sparc_emit_set_const32): If outputting a
index 5a7cb3f227ce01799a5e25833d14eb82260f4492..6562581df6eb1090d6fb2d0f9893deab37435fc7 100755 (executable)
@@ -97,6 +97,39 @@ __EOF__
   fi
 fi
 
+# Avoid the definition of the bool type in curses.h when using
+# g++, since it's now an official type in the C++ language.
+
+# This is also from fixinc.wrap.
+
+file=curses.h
+if [ -r $INPUT/$file ]; then
+  echo Checking $INPUT/$file
+  w='[  ]'
+  if grep "typedef$w$w*char$w$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
+
 # In limits.h, put #ifndefs around things that are supposed to be defined
 # in float.h to avoid redefinition errors if float.h is included first.