Mercurial > gnulib
annotate lib/stdbool.in.h @ 40057:b06060465f09
maint: Run 'make update-copyright'
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Tue, 01 Jan 2019 00:25:11 +0100 |
parents | 10eb9086bea0 |
children |
rev | line source |
---|---|
40057
b06060465f09
maint: Run 'make update-copyright'
Paul Eggert <eggert@cs.ucla.edu>
parents:
19484
diff
changeset
|
1 /* Copyright (C) 2001-2003, 2006-2019 Free Software Foundation, Inc. |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 Written by Bruno Haible <haible@clisp.cons.org>, 2001. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
4 This program is free software; you can redistribute it and/or modify |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
5 it under the terms of the GNU General Public License as published by |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 the Free Software Foundation; either version 2, or (at your option) |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 any later version. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 This program is distributed in the hope that it will be useful, |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
10 but WITHOUT ANY WARRANTY; without even the implied warranty of |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
12 GNU General Public License for more details. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
13 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
14 You should have received a copy of the GNU General Public License |
19190 | 15 along with this program; if not, see <https://www.gnu.org/licenses/>. */ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
16 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
17 #ifndef _GL_STDBOOL_H |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
18 #define _GL_STDBOOL_H |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
19 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
20 /* ISO C 99 <stdbool.h> for platforms that lack it. */ |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
21 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
22 /* Usage suggestions: |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
23 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
24 Programs that use <stdbool.h> should be aware of some limitations |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
25 and standards compliance issues. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 Standards compliance: |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 - <stdbool.h> must be #included before 'bool', 'false', 'true' |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 can be used. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
32 - You cannot assume that sizeof (bool) == 1. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
33 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 - Programs should not undefine the macros bool, true, and false, |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 as C99 lists that as an "obsolescent feature". |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
36 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 Limitations of this substitute, when used in a C89 environment: |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
39 - <stdbool.h> must be #included before the '_Bool' type can be used. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
40 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 - You cannot assume that _Bool is a typedef; it might be a macro. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
43 - Bit-fields of type 'bool' are not supported. Portable code |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
44 should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
45 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 - In C99, casts and automatic conversions to '_Bool' or 'bool' are |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 performed in such a way that every nonzero value gets converted |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
48 to 'true', and zero gets converted to 'false'. This doesn't work |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
49 with this substitute. With this substitute, only the values 0 and 1 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
50 give the expected result when converted to _Bool' or 'bool'. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
51 |
13240
2fe50700ce2c
test-stdbool: skip test that fails with Solaris CC
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
52 - C99 allows the use of (_Bool)0.0 in constant expressions, but |
2fe50700ce2c
test-stdbool: skip test that fails with Solaris CC
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
53 this substitute cannot always provide this property. |
2fe50700ce2c
test-stdbool: skip test that fails with Solaris CC
Eric Blake <eblake@redhat.com>
parents:
12559
diff
changeset
|
54 |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
55 Also, it is suggested that programs use 'bool' rather than '_Bool'; |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
56 this isn't required, but 'bool' is more common. */ |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
57 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
58 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
59 /* 7.16. Boolean type and values */ |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
60 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
61 /* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
62 definitions below, but temporarily we have to #undef them. */ |
10117
f73bf03d3c84
Make stdbool work on Haiku OS.
Andreas Färber <andreas.faerber@web.de>
parents:
9399
diff
changeset
|
63 #if defined __BEOS__ && !defined __HAIKU__ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
64 # include <OS.h> /* defines bool but not _Bool */ |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
65 # undef false |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
66 # undef true |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
67 #endif |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
68 |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
69 #ifdef __cplusplus |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
70 # define _Bool bool |
17069
d639e9aa0198
* lib/stdbool.in.h (_Bool) [__cplusplus]: bool, not _Bool.
Paul Eggert <eggert@penguin.cs.ucla.edu>
parents:
17068
diff
changeset
|
71 # define bool bool |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
72 #else |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
73 # if defined __BEOS__ && !defined __HAIKU__ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
74 /* A compiler known to have 'bool'. */ |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 /* If the compiler already has both 'bool' and '_Bool', we can assume they |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 are the same types. */ |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
77 # if !@HAVE__BOOL@ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
78 typedef bool _Bool; |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
79 # endif |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
80 # else |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
81 # if !defined __GNUC__ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
82 /* If @HAVE__BOOL@: |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
83 Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
84 the built-in _Bool type is used. See |
19190 | 85 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html |
19439
8bfc20b57265
maint: shorten https://lists.gnu.org/archive/html/... links
Jim Meyering <meyering@fb.com>
parents:
19192
diff
changeset
|
86 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html |
8bfc20b57265
maint: shorten https://lists.gnu.org/archive/html/... links
Jim Meyering <meyering@fb.com>
parents:
19192
diff
changeset
|
87 https://lists.gnu.org/r/bug-coreutils/2005-10/msg00086.html |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
88 Similar bugs are likely with other compilers as well; this file |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
89 wouldn't be used if <stdbool.h> was working. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 So we override the _Bool type. |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 If !@HAVE__BOOL@: |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
92 Need to define _Bool ourselves. As 'signed char' or as an enum type? |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 Use of a typedef, with SunPRO C, leads to a stupid |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 "warning: _Bool is a keyword in ISO C99". |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 Use of an enum type, with IRIX cc, leads to a stupid |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 "warning(1185): enumerated type mixed with another type". |
9399
ea739bb46da6
Fix Tru64 problem with stdbool.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
9260
diff
changeset
|
97 Even the existence of an enum type, without a typedef, |
ea739bb46da6
Fix Tru64 problem with stdbool.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
9260
diff
changeset
|
98 "Invalid enumerator. (badenum)" with HP-UX cc on Tru64. |
ea739bb46da6
Fix Tru64 problem with stdbool.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
9260
diff
changeset
|
99 The only benefit of the enum, debuggability, is not important |
ea739bb46da6
Fix Tru64 problem with stdbool.h.
Paul Eggert <eggert@cs.ucla.edu>
parents:
9260
diff
changeset
|
100 with these compilers. So use 'signed char' and no enum. */ |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
101 # define _Bool signed char |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
102 # else |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
103 /* With this compiler, trust the _Bool type if the compiler has it. */ |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
104 # if !@HAVE__BOOL@ |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
105 /* For the sake of symbolic names in gdb, define true and false as |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
106 enum constants, not only as macros. |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
107 It is tempting to write |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
108 typedef enum { false = 0, true = 1 } _Bool; |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
109 so that gdb prints values of type 'bool' symbolically. But then |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
110 values of type '_Bool' might promote to 'int' or 'unsigned int' |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
111 (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int' |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
112 (see ISO C 99 6.3.1.1.(2)). So add a negative value to the |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
113 enum; this ensures that '_Bool' promotes to 'int'. */ |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
114 typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool; |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
115 # endif |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
116 # endif |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
117 # endif |
17069
d639e9aa0198
* lib/stdbool.in.h (_Bool) [__cplusplus]: bool, not _Bool.
Paul Eggert <eggert@penguin.cs.ucla.edu>
parents:
17068
diff
changeset
|
118 # define bool _Bool |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
119 #endif |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
120 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
121 /* The other macros must be usable in preprocessor directives. */ |
17068
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
122 #ifdef __cplusplus |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
123 # define false false |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
124 # define true true |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
125 #else |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
126 # define false 0 |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
127 # define true 1 |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
128 #endif |
eefa36f75e14
stdbool: be more compatible with mixed C/C++ compiles
Paul Eggert <eggert@cs.ucla.edu>
parents:
16366
diff
changeset
|
129 |
9260
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
130 #define __bool_true_false_are_defined 1 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
131 |
14891e011037
Rename stdbool_.h to stdbool.in.h.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
132 #endif /* _GL_STDBOOL_H */ |