[openssl-users] FW: problem with missing STDINT.H file

Jakob Bohm jb-openssl at wisemo.com
Tue Feb 7 18:37:07 UTC 2017

On 07/02/2017 17:03, Michael Wojcik wrote:
>> From: openssl-users [mailto:openssl-users-bounces at openssl.org] On Behalf
>> Of Andy Polyakov
>> Sent: Tuesday, February 07, 2017 10:49
>>> # elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
>> || \
>>>       defined(__osf__) || defined(__sgi) || defined(__hpux) || \
>>>       defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
>> It should probably be noted that this is quite counter-intuitive
>> condition.
> Also, that "defined(__STDC_VERSION__)" is redundant; if X is not defined in a #if test, then it has to be replaced with 0, which is not >= 199901L. Any implementation that doesn't do that isn't even compatible with C90, and you'll have bigger problems.
> And the "defined" operator is an operator, not a function. The parentheses are superfluous.
Using parenthesis with the defined and sizeof operators is
considered good for readability and thus proper style in
most projects.

What is a lot less readable in the if/ifelse/endif block that
was posted is the somewhat counter intuitive order in which
conditions are checked (and thus override each other).  That kind
of complex logic often would benefit from comments clarifying the
reasoning.  For example why is the workaround for UEFI located
before tests for compiler support?  And why are all compilers
claiming compliance with recent STDC versions assumed NOT to
have stdint.h, only inttypes.h?


Jakob Bohm, CIO, Partner, WiseMo A/S.  https://www.wisemo.com
Transformervej 29, 2860 Søborg, Denmark.  Direct +45 31 13 16 10
This public discussion message is non-binding and may contain errors.
WiseMo - Remote Service Management for PCs, Phones and Embedded

More information about the openssl-users mailing list