1 | /** @file
|
---|
2 | Macros to simplify boolean expressions and operations.
|
---|
3 |
|
---|
4 | This header is not specified by the C95 standard but is included here for
|
---|
5 | operational convenience.
|
---|
6 |
|
---|
7 | The macro bool expands to _Bool, as required by the C99 specification.
|
---|
8 | This subsequently expands to BOOLEAN, is a UEFI data type which is automatically
|
---|
9 | defined correctly for the target CPU architecture.
|
---|
10 |
|
---|
11 | The remaining three macros are suitable for use in #if preprocessing
|
---|
12 | directives. They are true, which expands to the integer constant 1,
|
---|
13 | false, which expands to the integer constant 0, and
|
---|
14 | __bool_true_false_are_defined which expands to the integer constant 1.
|
---|
15 |
|
---|
16 | A program may undefine and perhaps then redefine the
|
---|
17 | macros bool, true, and false.
|
---|
18 |
|
---|
19 | Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.<BR>
|
---|
20 | This program and the accompanying materials are licensed and made available under
|
---|
21 | the terms and conditions of the BSD License that accompanies this distribution.
|
---|
22 | The full text of the license may be found at
|
---|
23 | http://opensource.org/licenses/bsd-license.
|
---|
24 |
|
---|
25 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
---|
26 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
---|
27 | **/
|
---|
28 | #ifndef _STDBOOL_H
|
---|
29 | #define _STDBOOL_H
|
---|
30 | #include <sys/EfiCdefs.h>
|
---|
31 |
|
---|
32 | #define bool _Bool
|
---|
33 | #define true 1
|
---|
34 | #define false 0
|
---|
35 | #define __bool_true_false_are_defined 1
|
---|
36 |
|
---|
37 | #endif /* _STDBOOL_H */
|
---|