Nico Huber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46722 )
Change subject: libpayload/curses: Use <stdbool.h> ......................................................................
libpayload/curses: Use <stdbool.h>
Change-Id: I35ef7c55fc6bcfb9c51a711a8e238f0970fd4ad4 Signed-off-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/curses/PDCurses/curses.h M payloads/libpayload/curses/curses.h 2 files changed, 2 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/22/46722/1
diff --git a/payloads/libpayload/curses/PDCurses/curses.h b/payloads/libpayload/curses/PDCurses/curses.h index 5f651fe..45245ae 100644 --- a/payloads/libpayload/curses/PDCurses/curses.h +++ b/payloads/libpayload/curses/PDCurses/curses.h @@ -41,6 +41,7 @@ /*----------------------------------------------------------------------*/
#include <stdarg.h> +#include <stdbool.h> #include <stddef.h> #include <stdio.h> /* Required by X/Open usage below */
@@ -48,12 +49,6 @@ # include <wchar.h> #endif
-#if defined(__cplusplus) || defined(__cplusplus__) || defined(__CPLUSPLUS) -extern "C" -{ -# define bool _bool -#endif - /*---------------------------------------------------------------------- * * PDCurses Manifest Constants @@ -82,8 +77,6 @@ * */
-typedef unsigned char bool; /* PDCurses Boolean type */ - #ifdef CHTYPE_LONG # if _LP64 typedef unsigned int chtype; diff --git a/payloads/libpayload/curses/curses.h b/payloads/libpayload/curses/curses.h index 1699250..b802adb 100644 --- a/payloads/libpayload/curses/curses.h +++ b/payloads/libpayload/curses/curses.h @@ -87,7 +87,7 @@ * User-definable tweak to disable the include of <stdbool.h>. */ #ifndef NCURSES_ENABLE_STDBOOL_H -#define NCURSES_ENABLE_STDBOOL_H 0 //// XXX +#define NCURSES_ENABLE_STDBOOL_H 1 #endif
/*