Permalink
Browse files

Just require stdbool.h and tell ncurses to use it

Now that Solaris' stdbool.h works for us, we may as well just require
it. The preamble is repetitive and didn't actually work anyway. (It
conflicts with ncurses' attempts to redefine bool when stdbool.h is
unavailable or disabled.)

We may need to add a different preamble later if we care about including
these headers in C++ (Solaris has a C++-incompatible stdbool.h), but we
can deal with that later.
  • Loading branch information...
1 parent d1d68e0 commit fe73d0c8bf42966a7f576c0ee9158753d7685592 @davidben davidben committed Apr 5, 2011
Showing with 2 additions and 32 deletions.
  1. +1 −2 configure.ac
  2. +0 −10 libfaim/aim.h
  3. +1 −10 owl.h
  4. +0 −10 window.h
View
@@ -80,8 +80,7 @@ AC_CHECK_FUNCS([des_key_sched DES_key_sched], [HAVE_DES_KEY_SCHED=1])
dnl Checks for header files.
AC_HEADER_STDC
AC_HEADER_SYS_WAIT
-AC_HEADER_STDBOOL
-AC_CHECK_HEADERS(strings.h sys/ioctl.h sys/filio.h unistd.h)
+AC_CHECK_HEADERS(stdbool.h strings.h sys/ioctl.h sys/filio.h unistd.h)
dnl Add CFLAGS for embeded perl
PERL_CFLAGS=`perl -MExtUtils::Embed -e ccopts`
View
@@ -17,17 +17,7 @@
#include <aim_cbtypes.h>
#include "config.h"
-#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
-#else
-#ifndef HAVE__BOOL
-#define _Bool signed char
-#endif
-#define bool _Bool
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-#endif /* HAVE_STDBOOL_H */
#include <stdio.h>
#include <string.h>
View
@@ -13,19 +13,10 @@
#include "compat/compat.h"
-#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
-#else
-#ifndef HAVE__BOOL
-#define _Bool signed char
-#endif
-#define bool _Bool
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-#endif /* HAVE_STDBOOL_H */
#ifndef OWL_PERL
+#define NCURSES_ENABLE_STDBOOL_H 1
#include <curses.h>
#include <panel.h>
#endif
View
@@ -4,17 +4,7 @@
#include <glib.h>
#include <glib-object.h>
-#ifdef HAVE_STDBOOL_H
#include <stdbool.h>
-#else
-#ifndef HAVE__BOOL
-#define _Bool signed char
-#endif
-#define bool _Bool
-#define false 0
-#define true 1
-#define __bool_true_false_are_defined 1
-#endif /* HAVE_STDBOOL_H */
G_BEGIN_DECLS

0 comments on commit fe73d0c

Please sign in to comment.