replace bool.h with autoconf

Most of the bool configuration was already happening there, no reason
for a separate file.
This commit is contained in:
Enno Rehling 2014-03-15 22:24:18 -07:00
parent 82aeb4b241
commit 3c706cf29b
4 changed files with 28 additions and 20 deletions

View File

@ -30,12 +30,38 @@
#cmakedefine HAVE_DIRECT_MKDIR 1 #cmakedefine HAVE_DIRECT_MKDIR 1
#cmakedefine HAVE_DIRECT__MKDIR 1 #cmakedefine HAVE_DIRECT__MKDIR 1
#include <stddef.h>
#if defined(HAVE_STRINGS_H) #if defined(HAVE_STRINGS_H)
#include <strings.h> #include <strings.h>
#endif #endif
#if defined(HAVE_UNISTD_H)
#include <unistd.h>
#endif
#if defined(HAVE_IO_H)
#include <io.h>
#endif
#if defined(HAVE_WINDOWS_H)
#include <windows.h>
#endif
#if defined(HAVE_STDBOOL_H)
# include <stdbool.h>
#else
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
typedef unsigned char _Bool;
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif
#ifndef HAVE__ACCESS #ifndef HAVE__ACCESS
#ifdef HAVE_ACCESS #ifdef HAVE_ACCESS
#define _access(path, mode) access(path, mode) #define _access(path, mode) access(path, mode)

View File

@ -9,7 +9,6 @@
*/ */
#include <platform.h> #include <platform.h>
#include <util/bool.h>
#include <curses.h> #include <curses.h>
#include <kernel/config.h> #include <kernel/config.h>

View File

@ -80,8 +80,6 @@ OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define unused (void) #define unused (void)
#include "util/bool.h"
#ifndef INLINE_FUNCTION #ifndef INLINE_FUNCTION
# define INLINE_FUNCTION # define INLINE_FUNCTION
#endif #endif

View File

@ -1,15 +0,0 @@
#if HAVE_STDBOOL_H
# include <stdbool.h>
#else
# if ! HAVE__BOOL
# ifdef __cplusplus
typedef bool _Bool;
# else
typedef unsigned char _Bool;
# endif
# endif
# define bool _Bool
# define false 0
# define true 1
# define __bool_true_false_are_defined 1
#endif