]> git.ipfire.org Git - thirdparty/HylaFAX.git/commitdiff
Tim Rice's patch to make the bool stuff actually work.
authorRobert Colquhoun <rjc@trump.net.au>
Mon, 26 Jul 1999 14:57:29 +0000 (14:57 +0000)
committerRobert Colquhoun <rjc@trump.net.au>
Mon, 26 Jul 1999 14:57:29 +0000 (14:57 +0000)
configure
util/Types.h

index 516a7b32f7b734df949932b383c83b58965c2e5e..341f4add6920b4a9e01a23313b0e03314905e305 100755 (executable)
--- a/configure
+++ b/configure
@@ -1650,9 +1650,7 @@ EmitConfigurationDefinitions()
     if [ "$CONFIG_NEEDBOOL" = "yes" ]; then
         Note "... adding definition for C++ bool type"
         echo
-        echo "typedef int bool;"
-        echo "const bool false = 0;"
-        echo "const bool true = 1;"
+        echo "#define NEED_BOOL"
         echo
     fi
     #
index 5bc94ec8372d39fdab6d05b9fbba96708c3ba7b6..29bc6379cd519b5adb40bbfa476c3dda5fee04d3 100644 (file)
 #include "sys/types.h"
 #include "port.h"
 
+// Boolean type
+#ifdef NEED_BOOL
+typedef unsigned char bool;
+#undef true
+#define true ((bool)1)
+#undef false
+#define false ((bool)0)
+#endif
+
 // minimum of two numbers
 inline int fxmin(int a, int b)         { return (a < b) ? a : b; }
 inline u_long fxmin(u_long a, u_long b)        { return (a < b) ? a : b; }