updated stdbool.h

SupportDefs.h now includes stdbool.h
This can break in some cases


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11985 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Jérôme Duval
2005-03-25 17:08:27 +00:00
parent f0a0f2a462
commit aab32edf08
2 changed files with 13 additions and 8 deletions
+7 -5
View File
@@ -40,6 +40,7 @@ typedef unsigned short ushort;
// System Includes ------------------------------------------------------------- // System Includes -------------------------------------------------------------
#include <BeBuild.h> #include <BeBuild.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdbool.h>
#include <Errors.h> #include <Errors.h>
// Project Includes ------------------------------------------------------------ // Project Includes ------------------------------------------------------------
@@ -116,11 +117,12 @@ extern _IMPEXP_BE const char *B_EMPTY_STRING;
// Grandfathering -------------------------------------------------------------- // Grandfathering --------------------------------------------------------------
#ifndef __cplusplus //#ifndef __cplusplus
typedef unsigned char bool; //typedef enum { false = 0, true = 1 } _Bool;
#define false 0 //#define bool _Bool
#define true 1 //#define false 0
#endif //#define true 1
//#endif
#ifndef NULL #ifndef NULL
#define NULL (0) #define NULL (0)
+6 -3
View File
@@ -1,18 +1,21 @@
#ifndef _STDBOOL_H_ #ifndef _STDBOOL_H_
#define _STDBOOL_H_ #define _STDBOOL_H_
/* /*
** Distributed under the terms of the OpenBeOS License. * Copyright 2005, Haiku Inc. All Rights Reserved.
* Distributed under the terms of the MIT License.
*/ */
#ifndef __cplusplus #ifndef __cplusplus
typedef enum { false = 0, true = 1 } _Bool; typedef enum { false = 0, true = 1 } _Bool;
#define true 1
#define false 0
#else #else
typedef bool _Bool; typedef bool _Bool;
#define true true
#define false false
#endif #endif
#define bool _Bool #define bool _Bool
#define true 1
#define false 0
#define __bool_true_false_are_defined 1 #define __bool_true_false_are_defined 1
#endif /* _STDBOOL_H_ */ #endif /* _STDBOOL_H_ */