wmail: use stdbool.h if available.
This commit is contained in:
parent
24ce08f47c
commit
dff64f3b71
|
@ -14,6 +14,7 @@ PKG_CHECK_MODULES([dockapp], [dockapp])
|
||||||
|
|
||||||
dnl Checks for header files.
|
dnl Checks for header files.
|
||||||
AC_HEADER_DIRENT
|
AC_HEADER_DIRENT
|
||||||
|
AC_HEADER_STDBOOL
|
||||||
AC_HEADER_STDC
|
AC_HEADER_STDC
|
||||||
AC_CHECK_HEADERS([limits.h strings.h sys/time.h])
|
AC_CHECK_HEADERS([limits.h strings.h sys/time.h])
|
||||||
CPPFLAGS_old="$CPPFLAGS"
|
CPPFLAGS_old="$CPPFLAGS"
|
||||||
|
|
|
@ -59,11 +59,20 @@
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// typedefs
|
// typedefs
|
||||||
|
|
||||||
#if !defined(__cplusplus) && !defined(c_plusplus)
|
#ifdef HAVE_STDBOOL_H
|
||||||
typedef enum {
|
# include <stdbool.h>
|
||||||
false = 0,
|
#else
|
||||||
true = 1
|
# ifndef HAVE__BOOL
|
||||||
} bool;
|
# ifdef __cplusplus
|
||||||
|
typedef bool _Bool;
|
||||||
|
# else
|
||||||
|
# define _Bool signed char
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
# define bool _Bool
|
||||||
|
# define false 0
|
||||||
|
# define true 1
|
||||||
|
# define __bool_true_false_are_defined 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -497,7 +497,7 @@ static bool ReadEnum( const char *from, unsigned int line, int *to,
|
||||||
|
|
||||||
static bool IsWhiteSpace( const char *chr )
|
static bool IsWhiteSpace( const char *chr )
|
||||||
{
|
{
|
||||||
return ( chr != NULL && ( *chr == ' ' || *chr == '\t' || *chr == '\n' )) ? true : false;
|
return chr != NULL && ( *chr == ' ' || *chr == '\t' || *chr == '\n' );
|
||||||
}
|
}
|
||||||
|
|
||||||
static const char *SkipWhiteSpaces( const char *str )
|
static const char *SkipWhiteSpaces( const char *str )
|
||||||
|
|
Loading…
Reference in a new issue