[openssl-dev] [openssl.org #4144] patch: Use '__sun' instead of 'sun' for strict ISO conforming, compiler/options

Andy Polyakov via RT rt at openssl.org
Sun Nov 22 12:32:04 UTC 2015


>> I'd like to propose the attached patch to 1.0.2d which avoids problems
>> with strict ISO conforming compiler/options, which do not define 'sun' only
>> '__sun' as usual... such as gcc/clang -std=c99
>>
>> This affects the build itself, but also any user of openssl/opensslconf.h
> 
> I've commited only the part that applied to the master branch, but
> fixed that in all the branches.  Please let me know if you need
> other changes in the stable branches.

There is partial contradiction here. It's argued in terms of
contemporary compilers, while the code fragments in question, mostly
those in e_os.h target specific *legacy* platform which is unlikely to
have contemporary compiler. So that attempt to harmonize with recent
compiler one breaks things for old compiler. One can argue that it's
probably broken anyway, but it doesn't really make harmonization more
right, does it? If platform is broken, then support should be disclaimed
and correct approach would be to *remove* code. If support is not
disclaimed then correct approach would be to look at target system, not
what gcc/clang do on Linux. BTW, support for platform in question *is*
disclaimed in master, so that in master code should be removed. Even
that sys/filio.h thing, because default alternative works fine on Solaris.

Side note about "#if define (sun) /* Newer Sparc's */" "sun" denotes OS
vendor, not processor. So that it would be more appropriate to switch to
sparc || __sparc__.




More information about the openssl-dev mailing list