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