diff options
author | Ian Romanick <idr@freedesktop.org> | 2010-07-21 13:09:08 -0700 |
---|---|---|
committer | Ian Romanick <idr@freedesktop.org> | 2010-07-21 13:12:02 -0700 |
commit | 502c04f6fd3cd8941b9c66134d28a908bf29016c (patch) | |
tree | aee0dbffdf2aa5abb43e54d6a35469f7788c59e3 | |
parent | 75d9bb54062505fd74dbb2c33a8a1a05eefd9dbf (diff) |
Work around systems that don't have stdbool.h
-rw-r--r-- | include/glu3.h | 16 | ||||
-rw-r--r-- | src/system.h | 16 |
2 files changed, 15 insertions, 17 deletions
diff --git a/include/glu3.h b/include/glu3.h index 2c90708..995132f 100644 --- a/include/glu3.h +++ b/include/glu3.h @@ -37,7 +37,21 @@ #include <GL/gl.h> #include <GL/glext.h> -#include <stdbool.h> +#ifdef HAVE_STDBOOL_H +# include <stdbool.h> +#else +# ifndef HAVE__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 #define GLU3_VERSION_0_1 #define GLU3_VERSION_0_9 diff --git a/src/system.h b/src/system.h index 15444fc..afe64fa 100644 --- a/src/system.h +++ b/src/system.h @@ -5,19 +5,3 @@ #ifndef HAVE_STRTOF #define strtof(_a, _b) ((float) strtod(_a, _b)) #endif - -#ifdef HAVE_STDBOOL_H -# include <stdbool.h> -#else -# ifndef HAVE__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 |