Skip to content

Commit e2142c9

Browse files
shr-projectColinKYuen
authored andcommitted
configure: make sure to call AC_CHECK_HEADER_STDBOOL (#112)
before using ac_cv_sizeof_bool It was called after this conditional, so PG_USE_STDBOOL wasn't set even when it should be as shown in at the end of config.log: ac_cv_header_stdbool_h=yes ac_cv_sizeof_bool=1 ac_cv_type__Bool=yes #define SIZEOF_BOOL 1 #define HAVE__BOOL 1 #define HAVE_STDBOOL_H 1 * fixes: postgresql-interfaces/psqlodbc#110 postgresql-interfaces/psqlodbc#94 Signed-off-by: Martin Jansa <[email protected]>
1 parent 17e4769 commit e2142c9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

configure.ac

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,11 @@ AC_CHECK_SIZEOF([bool], [],
6363
#include <stdbool.h>
6464
#endif])
6565

66+
AC_CHECK_HEADER_STDBOOL()
67+
6668
dnl We use <stdbool.h> if we have it and it declares type bool as having
6769
dnl size 1. Otherwise, c.h will fall back to declaring bool as unsigned char.
68-
if test "$ac_cv_header_stdbool_h" = yes -a "$ac_cv_sizeof_bool" = 1; then
70+
if test "$ac_cv_header_stdbool_h" = yes && test "$ac_cv_sizeof_bool" = 1; then
6971
AC_DEFINE([PG_USE_STDBOOL], 1,
7072
[Define to 1 to use <stdbool.h> to define type bool.])
7173
fi

0 commit comments

Comments
 (0)