more portable handling of the bool data type (Mac OS X has stdbool.h)
This commit is contained in:
parent
938b230fa7
commit
a9f56adb59
|
@ -762,9 +762,11 @@ if test x$medcli = xtrue; then
|
||||||
me=true
|
me=true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl ==========================================
|
dnl ===========================================
|
||||||
dnl check required libraries and header files
|
dnl check required libraries and header files
|
||||||
dnl ==========================================
|
dnl ===========================================
|
||||||
|
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
|
|
||||||
saved_LIBS=$LIBS
|
saved_LIBS=$LIBS
|
||||||
LIBS=""
|
LIBS=""
|
||||||
|
|
|
@ -116,12 +116,22 @@
|
||||||
/**
|
/**
|
||||||
* General purpose boolean type.
|
* General purpose boolean type.
|
||||||
*/
|
*/
|
||||||
typedef int bool;
|
#ifdef HAVE_STDBOOL_H
|
||||||
|
# include <stdbool.h>
|
||||||
|
#else
|
||||||
|
# ifndef HAVE__BOOL
|
||||||
|
# define _Bool signed char
|
||||||
|
# endif /* HAVE__BOOL */
|
||||||
|
# define bool _Bool
|
||||||
|
# define false 0
|
||||||
|
# define true 1
|
||||||
|
# define __bool_true_false_are_defined 1
|
||||||
|
#endif /* HAVE_STDBOOL_H */
|
||||||
#ifndef FALSE
|
#ifndef FALSE
|
||||||
# define FALSE 0
|
# define FALSE false
|
||||||
#endif /* FALSE */
|
#endif /* FALSE */
|
||||||
#ifndef TRUE
|
#ifndef TRUE
|
||||||
# define TRUE 1
|
# define TRUE true
|
||||||
#endif /* TRUE */
|
#endif /* TRUE */
|
||||||
|
|
||||||
typedef enum status_t status_t;
|
typedef enum status_t status_t;
|
||||||
|
|
Loading…
Reference in New Issue