]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Portability to OSF/1 5.1 cc.
authorBruno Haible <bruno@clisp.org>
Tue, 30 Apr 2002 18:19:02 +0000 (18:19 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:07:55 +0000 (12:07 +0200)
lib/ChangeLog
lib/Makefile.am
lib/stdbool.h.in
m4/ChangeLog
m4/stdbool.m4

index 29a0039c9239c5f9648ccc4fc33f72ee9ec97fa3..502ef44cc0e4bdc08cdbdb1ac7ae3a478eb9fab1 100644 (file)
@@ -1,3 +1,9 @@
+2002-04-30  Bruno Haible  <bruno@clisp.org>
+
+       * stdbool.h.in (_Bool): Omit the definition if _Bool is already known
+       as a builtin primitive type. Needed for cc on OSF/1 5.1.
+       * Makefile.am (stdbool.h): Substitute the value of HAVE__BOOL.
+
 2002-04-26  Bruno Haible  <bruno@clisp.org>
 
        * basename.h: Use __GLIBC__ instead of __GNU_LIBRARY__, because
index 5a5df0e013f96616f3600088842197de61fbd363..97c487a21cd303b4724edb6f961ef01dc0294d7d 100644 (file)
@@ -118,7 +118,7 @@ DISTCLEANFILES = fnmatch.h
 
 all-local c-ctype.lo execute.lo javacomp.lo javaexec.lo pipe-bidi.lo pipe-in.lo pipe-out.lo progname.lo tmpdir.lo wait-process.lo xerror.lo: @STDBOOL_H@
 stdbool.h: stdbool.h.in
-       cp $(srcdir)/stdbool.h.in stdbool.h
+       sed -e 's/@''HAVE__BOOL''@/@HAVE__BOOL@/g' < $(srcdir)/stdbool.h.in > stdbool.h
 MOSTLYCLEANFILES = @STDBOOL_H@
 
 
index 16b43886df0ade4c50c8237f021031a496a59461..69f6ef725fe3c76c80d7716141d4b083dc79c265 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001 Free Software Foundation, Inc.
+/* Copyright (C) 2001-2002 Free Software Foundation, Inc.
    Written by Bruno Haible <haible@clisp.cons.org>, 2001.
 
    This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,9 @@
 
 /* For the sake of symbolic names in gdb, define _Bool as an enum type.  */
 #ifndef __cplusplus
+# if !@HAVE__BOOL@
 typedef enum { false = 0, true = 1 } _Bool;
+# endif
 #else
 typedef bool _Bool;
 #endif
index 2f6056e88f94298834db6e866869ba06d072eb26..0d72d0779f788f70d45bdb5020abab39133102b5 100644 (file)
@@ -1,3 +1,8 @@
+2002-04-30  Bruno Haible  <bruno@clisp.org>
+
+       * stdbool.m4 (gt_STDBOOL_H): If <stdbool.h> does not exist, check for
+       _Bool as a builtin primitive type. Needed for cc on OSF/1 5.1.
+
 2002-04-24  Bruno Haible  <bruno@clisp.org>
 
        * gettext-0.11.2 released.
index f01f89c6cfd1815c4c5a66103ec95bd680babcaf..d0959fc70da9d5f73aa4fa033411c6b56bad1e00 100644 (file)
@@ -1,4 +1,4 @@
-# stdbool.m4 serial 1 (gettext-0.11)
+# stdbool.m4 serial 2 (gettext-0.11.3)
 dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
 dnl This file is free software, distributed under the terms of the GNU
 dnl General Public License.  As a special exception to the GNU General
@@ -32,6 +32,17 @@ if test $gt_cv_header_stdbool_h = yes; then
   STDBOOL_H=''
 else
   STDBOOL_H='stdbool.h'
+  AC_MSG_CHECKING([for _Bool type])
+  AC_CACHE_VAL(gt_cv_type_Bool, [
+    AC_TRY_COMPILE([_Bool x = sizeof (_Bool);], [],
+      gt_cv_type_Bool=yes, gt_cv_type_Bool=no)])
+  AC_MSG_RESULT([$gt_cv_type_Bool])
+  if test $gt_cv_type_Bool = yes; then
+    HAVE__BOOL=1
+  else
+    HAVE__BOOL=0
+  fi
+  AC_SUBST(HAVE__BOOL)
 fi
 AC_SUBST(STDBOOL_H)
 ])