Re: FW: problem with missing STDINT.H file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/02/2017 17:03, Michael Wojcik wrote:
From: openssl-users [mailto:openssl-users-bounces@xxxxxxxxxxx] 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?

Enjoy

Jakob
--
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

--
openssl-users mailing list
To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux