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
#
#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; }