include: Make stdbool.h a separate file
This patch moves the traditional POSIX stdbool.h definitions out from stdint.h into their own file. This helps for using these definitions in commonlib code which may be compiled in different environments. For coreboot everything should chain-include this stuff via types.h anyway so nothing should change. Change-Id: Ic8d52be80b64d8e9564f3aee8975cb25e4c187f5 Signed-off-by: Julius Werner <jwerner@chromium.org> Reviewed-on: https://review.coreboot.org/c/coreboot/+/36837 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
committed by
Patrick Georgi
parent
85b41445b5
commit
a2148377b5
16
src/include/stdbool.h
Normal file
16
src/include/stdbool.h
Normal file
@@ -0,0 +1,16 @@
|
||||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
#ifndef __STDBOOL_H__
|
||||
#define __STDBOOL_H__
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#ifdef __ROMCC__
|
||||
typedef uint8_t bool;
|
||||
#else
|
||||
typedef _Bool bool;
|
||||
#endif
|
||||
#define true 1
|
||||
#define false 0
|
||||
|
||||
#endif /* __STDBOOL_H__ */
|
Reference in New Issue
Block a user