From baf7c0ab5bea90248101b122357fe5beb7e0bda7 Mon Sep 17 00:00:00 2001 From: jjohnstn Date: Thu, 3 Jul 2003 17:11:07 +0000 Subject: [PATCH] 2003-07-03 Shaun Jackman * libc/include/stdbool.h: New header file defined by C99. --- newlib/ChangeLog | 4 ++++ newlib/libc/include/stdbool.h | 22 ++++++++++++++++++++++ 2 files changed, 26 insertions(+) create mode 100644 newlib/libc/include/stdbool.h diff --git a/newlib/ChangeLog b/newlib/ChangeLog index dcf7ef163e..6c4251d01d 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,7 @@ +2003-07-03 Shaun Jackman + + * libc/include/stdbool.h: New header file defined by C99. + 2003-07-02 Jeff Johnston * libc/include/sys/types.h (int8_t): Make signed. diff --git a/newlib/libc/include/stdbool.h b/newlib/libc/include/stdbool.h new file mode 100644 index 0000000000..291740ae94 --- /dev/null +++ b/newlib/libc/include/stdbool.h @@ -0,0 +1,22 @@ +#ifndef _STDBOOL_H_ +#define _STDBOOL_H_ + +#ifndef __cplusplus + +#undef bool +#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L) +#define bool _Bool +#else +#define bool unsigned char +#endif + +#undef false +#define false 0 +#undef true +#define true 1 + +#define __bool_true_false_are_defined 1 + +#endif /* !__cplusplus */ + +#endif /* _STDBOOL_H_ */ -- 2.11.0