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
/*
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46722 )
Change subject: libpayload/curses: Use <stdbool.h> ......................................................................
Patch Set 1: Code-Review+1
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46722 )
Change subject: libpayload/curses: Use <stdbool.h> ......................................................................
Patch Set 1: Code-Review+2
Patrick Georgi has submitted this change. ( 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 Reviewed-on: https://review.coreboot.org/c/coreboot/+/46722 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Paul Menzel paulepanter@users.sourceforge.net Reviewed-by: Angel Pons th3fanbus@gmail.com --- M payloads/libpayload/curses/PDCurses/curses.h M payloads/libpayload/curses/curses.h 2 files changed, 2 insertions(+), 9 deletions(-)
Approvals: build bot (Jenkins): Verified Paul Menzel: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
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
/*