diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/compat/Makefile.am | 1 | ||||
-rw-r--r-- | src/compat/compat-stdbool.h | 12 | ||||
-rw-r--r-- | src/openvpn/basic.h | 13 | ||||
-rw-r--r-- | src/openvpn/syshead.h | 1 |
4 files changed, 14 insertions, 13 deletions
diff --git a/src/compat/Makefile.am b/src/compat/Makefile.am index 5ee35f7..7ad4452 100644 --- a/src/compat/Makefile.am +++ b/src/compat/Makefile.am @@ -20,6 +20,7 @@ noinst_LTLIBRARIES = libcompat.la libcompat_la_SOURCES = \ compat.h \ + compat-stdbool.h \ compat-dirname.c \ compat-basename.c \ compat-gettimeofday.c \ diff --git a/src/compat/compat-stdbool.h b/src/compat/compat-stdbool.h new file mode 100644 index 0000000..9941218 --- /dev/null +++ b/src/compat/compat-stdbool.h @@ -0,0 +1,12 @@ +#ifndef __COMPAT_STDBOOL_H +#define __COMPAT_STDBOOL_H + +#ifdef HAVE_STDBOOL_H +#include <stdbool.h> +#else +typedef int bool; +#define false 0 +#define true 1 +#endif + +#endif diff --git a/src/openvpn/basic.h b/src/openvpn/basic.h index 7c13e22..298cf10 100644 --- a/src/openvpn/basic.h +++ b/src/openvpn/basic.h @@ -25,19 +25,6 @@ #ifndef BASIC_H #define BASIC_H -/* bool definitions */ -#ifndef bool -#define bool int -#endif - -#ifndef true -#define true 1 -#endif - -#ifndef false -#define false 0 -#endif - #define BOOL_CAST(x) ((x) ? (true) : (false)) /* size of an array */ diff --git a/src/openvpn/syshead.h b/src/openvpn/syshead.h index 6f9422c..3337764 100644 --- a/src/openvpn/syshead.h +++ b/src/openvpn/syshead.h @@ -26,6 +26,7 @@ #define SYSHEAD_H #include "compat.h" +#include "compat-stdbool.h" /* branch prediction hints */ #if defined(__GNUC__) |