Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2461) bool type already exists
Home

[Freeciv-Dev] Re: (PR#2461) bool type already exists

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Bernd Korz <bernd.korz@xxxxxxxxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2461) bool type already exists
From: "Raimar Falke via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 9 Dec 2002 01:09:23 -0800
Reply-to: rt@xxxxxxxxxxxxxx

On Mon, Dec 09, 2002 at 12:02:55AM -0800, Jason Short via RT wrote:
> 
> [rfalke - Tue Dec  3 07:47:56 2002]:
> 
> > Also note that the patch is deferred: it wasn't reported against
> > freeciv bug against freeciv-test. The current freeciv doesn't show the
> > error yet. So Bernd can't test the fix.
> 
> It has now been confirmed against freeciv CVS.

Bernd: can you retest the attached patch?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  +#if defined(__alpha__) && defined(CONFIG_PCI)
  +       /*
  +        * The meaning of life, the universe, and everything. Plus
  +        * this makes the year come out right.
  +        */
  +       year -= 42;
  +#endif
    -- Patch for 1.3.2 (kernel/time.c) from Marcus Meissner

Index: configure.in
===================================================================
RCS file: /home/freeciv/CVS/freeciv/configure.in,v
retrieving revision 1.205
diff -u -r1.205 configure.in
--- configure.in        2002/11/30 20:42:01     1.205
+++ configure.in        2002/12/02 18:25:52
@@ -547,7 +547,8 @@
 
 dnl Checks for header files.
 AC_HEADER_STDC
-AC_CHECK_HEADERS(fcntl.h sys/time.h sys/types.h unistd.h sys/utsname.h)
+AC_CHECK_HEADERS(fcntl.h sys/time.h sys/types.h unistd.h sys/utsname.h \
+                 stdbool.h)
 dnl Avoid including the unix emulation layer if we build mingw executables
 dnl There would be type conflicts between winsock and bsd/unix includes
 if test "x$MINGW32" != "xyes"; then
Index: common/shared.h
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/shared.h,v
retrieving revision 1.106
diff -u -r1.106 shared.h
--- common/shared.h     2002/11/21 13:35:31     1.106
+++ common/shared.h     2002/12/02 18:25:54
@@ -15,6 +15,24 @@
 
 #include <stdlib.h>            /* size_t */
 
+#if __BEOS__
+#include <posix/be_prim.h>
+#define __bool_true_false_are_defined 1
+#else
+#ifdef HAVE_STDBOOL_H
+#include <stdbool.h>
+#else /* Implement <stdbool.h> ourselves */
+#undef bool
+#undef true
+#undef false
+#undef __bool_true_false_are_defined
+#define bool fc_bool
+#define true  1
+#define false 0
+#define __bool_true_false_are_defined 1
+typedef unsigned int fc_bool;
+#endif /* ! HAVE_STDBOOL_H */
+#endif /* ! __BEOS__ */
 
 /* Want to use GCC's __attribute__ keyword to check variadic
  * parameters to printf-like functions, without upsetting other
@@ -47,14 +64,16 @@
    another unreachable condition. */
 #define FC_INFINITY            (1000 * 1000 * 1000)
 
-#ifndef TRUE
-#define TRUE (1)
+#ifdef TRUE
+#undef TRUE
 #endif
-#ifndef FALSE
-#define FALSE (0)
+
+#ifdef FALSE
+#undef FALSE
 #endif
 
-typedef int bool;
+#define TRUE true
+#define FALSE false
 
 #ifndef MAX
 #define MAX(x,y) (((x)>(y))?(x):(y))

[Prev in Thread] Current Thread [Next in Thread]