Possible errors building gnupg 2.07 under leopard mac os x 10.5
Werner Koch
wk at gnupg.org
Tue Nov 13 16:57:11 CET 2007
On Mon, 12 Nov 2007 20:32, rjh at sixdemonbag.org said:
> Well, the reason why I ask is because OS X 10.5 is a true UNIX. As in,
> it's officially passed the certification process and the appropriate
> agencies have given their seal of approval to it. So if this is a
> violation of the UNIX standard, then this is big news to a lot of people.
POSIX 2001 refers to C standard for stdbool.h. stdbool.h is responsible
for mapping the new type _Bool to bool. C-99:
7.16 Boolean type and values <stdbool.h>
[#1] The header <stdbool.h> defines four macros.
[#2] The macro
bool
expands to _Bool.
[#3] The remaining three macros are suitable for use in #if
preprocessing directives. They are
true
which expands to the decimal constant 1,
false
which expands to the decimal constant 0, and
__bool_true_false_are_defined
which expands to the decimal constant 1.
[#4] Notwithstanding the provisions of 7.1.3, a program is
permitted to undefine and perhaps then redefine the macros
bool, true, and false.199)
The C-99 rationale says:
6.4.1 Keywords
Several keywords were added in C89: const, enum, signed, void and
volatile. New in C99 are the keywords inline, restrict, _Bool,
_Complex and _Imaginary.
Where possible, however, new features have been added by overloading
existing keywords, as, for example, long double instead of
extended. It is recognized that each added keyword will require some
existing code that used it as an identifier to be rewritten. No
meaningful programs are known to be quietly changed by adding the new
keywords.
The keywords entry, fortran, and asm have not been included since
they were either never used, or are not portable. Uses of fortran and
asm as keywords are noted as common extensions.
_Complex and _Imaginary, not complex and imaginary, are keywords in
order that freestanding implementations are not required to support
complex. Old code using the names complex or imaginary will still
work (assuming <complex.h> is not included), and combined C/C++
implementations will not have to finesse C-only public keywords.
Thus the use of bool is not explictly mentioned but the introduction of
_Bool and stdbool.h instead of just defining bool is a good indication
that bool shall only be defined if stdbool.h is included. _Bool was
already a reserved identifier in C-89. The last paragraph about
complex.h is also an indication of why stdbool.h should be included.
To test what Leoprad really does, a short test program would make sense.
Shalom-Salam,
Werner
--
Die Gedanken sind frei. Auschnahme regelt ein Bundeschgesetz.
More information about the Gnupg-devel
mailing list