Re: [openssl-users] FW: problem with missing STDINT.H file
> You guys are both important contributors to the project. +1 Personally I have learn a lot from your contributions. Thanks Jakob and Michael. -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
> It's cargo-cult programming, most often by people who can't be bothered to > learn the language they're using. There are also sometimes portability issues, vendors get things wrong. But at any rate, for this project, OpenSSL style says parens after sizeof and says nothing at all about pre-processor defined operator. It probably should, but clearly our existing style uses parens. Ok? You guys are both important contributors to the project. It hurts me to see you fight :) -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
> From: openssl-users [mailto:openssl-users-boun...@openssl.org] On Behalf > Of Jakob Bohm > Sent: Tuesday, February 07, 2017 13:37 > To: openssl-users@openssl.org > Subject: Re: [openssl-users] FW: problem with missing STDINT.H file > > Using parenthesis with the defined and sizeof operators is > considered good for readability and thus proper style in > most projects. Rubbish. Cite a methodologically sound study that shows it improves readability, or that "most projects" define it as "proper style". (Good luck with the latter, since I'm willing to wager the vast majority of C source isn't associated with any explicit style document.) It's cargo-cult programming, most often by people who can't be bothered to learn the language they're using. Michael Wojcik Distinguished Engineer, Micro Focus -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
On 07/02/2017 17:03, Michael Wojcik wrote: From: openssl-users [mailto:openssl-users-boun...@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? 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
Re: [openssl-users] FW: problem with missing STDINT.H file
> From: openssl-users [mailto:openssl-users-boun...@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. # elif __STDC_VERSION__ >= 199901L || \ defined __osf__ || defined __sgi || defined __hpux || \ defined OPENSSL_SYS_VMS || defined __OpenBSD__ || defined __sun /* C99 implementations and some others have inttype.h */ Ah, that's almost readable. Michael Wojcik Distinguished Engineer, Micro Focus -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
>> The attached text file is a snippet from attempting to install >> openssl-1.1.0c on a Solaris 8 machine. As can be seen, failed when >> could not be found. > > Do you have inttypes.h instead? > > As Jeff pointed out in another email this is for uint32_t and similar > types. These get included from e_os2.h as follows: > > # if defined(OPENSSL_SYS_UEFI) > typedef INT8 int8_t; > typedef UINT8 uint8_t; > typedef INT16 int16_t; > typedef UINT16 uint16_t; > typedef INT32 int32_t; > typedef UINT32 uint32_t; > typedef INT64 int64_t; > typedef UINT64 uint64_t; > # define PRIu64 "%Lu" > # elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ > defined(__osf__) || defined(__sgi) || defined(__hpux) || \ > defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) > # include It should probably be noted that this is quite counter-intuitive condition. Basically all those defined(__this-or-that__) refer to systems that are kind of stuck between standards and are "almost, but not quite, entirely unlike" 199901L. So that intuitively one would expect to see __STDC_VERSION__ < 199901L || defined(__this-or-that__). But then it was argued that inttypes.h >= 199901L includes stdint.h anyway, as well as defines other "goodies". So that this condition effectively produces two different outcomes: on >=199901L it results in *extended* equivalent of stdint.h, and on __this-n-that__ - in *pre-standard*, potentially limited equivalent of stdint.h. And remaining question in the context of original query is what is Solaris 8. It does have inttypes.h so that one can [and probably should] extend __this-or-that__ with defined(__sun). [And as Jeffrey already mentioned compiling OpenSSL is job for C compiler, not C++.] -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
On 30/01/17 20:44, Carter, James M. (MSFC-ES34) wrote: > > > > > The attached text file is a snippet from attempting to install > openssl-1.1.0c on a Solaris 8 machine. As can be seen, failed when > could not be found. Do you have inttypes.h instead? As Jeff pointed out in another email this is for uint32_t and similar types. These get included from e_os2.h as follows: # if defined(OPENSSL_SYS_UEFI) typedef INT8 int8_t; typedef UINT8 uint8_t; typedef INT16 int16_t; typedef UINT16 uint16_t; typedef INT32 int32_t; typedef UINT32 uint32_t; typedef INT64 int64_t; typedef UINT64 uint64_t; # define PRIu64 "%Lu" # elif (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) || \ defined(__osf__) || defined(__sgi) || defined(__hpux) || \ defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) # include # elif defined(_MSC_VER) && _MSC_VER<=1500 /* * minimally required typdefs for systems not supporting inttypes.h or * stdint.h: currently just older VC++ */ typedef signed char int8_t; typedef unsigned char uint8_t; typedef short int16_t; typedef unsigned short uint16_t; typedef int int32_t; typedef unsigned int uint32_t; typedef __int64 int64_t; typedef unsigned __int64 uint64_t; # else # include # endif As you can see we test for various things and then we either include inttypes.h or stdint.h (or do some platform specific things for UEFI and MS). If you have inttypes.h then a tweak to the above tests might be sufficient to get it going. Matt -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
> The attached text file is a snippet from attempting to install > openssl-1.1.0c on a Solaris 8 machine. As can be seen, failed when > could not be found. There is no such file anywhere on this > machine. As root, searched from the root directory for the file. Do have > in more than one location, /usr/include > /opt/SUNWSpro/prod/include/CC/std /opt/SUNWSpro/prod/include/CC/stlport4 CC is the Sun C++ compiler. C99 offered and its available for C programs. provides uint32_t, uintptr_t and friends. Many C++ compilers offer them, but the types it was not required for C++ until recently (C++11?). Until this email, I thought Microsoft was the only implementation which did not offer it in most of its compilers. Microsoft users must include instead (I think it changed in VS2013 with better C++11 support). I know is available on later Solaris, but I don't know what you need for early Solaris. Or maybe more correctly, its available in later versions of Sun Studio/Oracle Studio/Developer Studio (like versions 12). The real question is for you, do you have the data types like uint32_t, uintptr_t, and friends. Jeff -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users
Re: [openssl-users] FW: problem with missing STDINT.H file
On 30/01/2017 21:44, Carter, James M. (MSFC-ES34) wrote: The attached text file is a snippet from attempting to install openssl-1.1.0c on a Solaris 8 machine. As can be seen, failed when could not be found. There is no such file anywhere on this machine. As root, searched from the root directory for the file. Do have in more than one location, /usr/include /opt/SUNWSpro/prod/include/CC/std /opt/SUNWSpro/prod/include/CC/stlport4 I found this file on GITHUB. Can it be downloaded and put in /usr/include or /opt/SUNWspro/prod/CC/std. The correct contents of stdint.h depends on the compiler and its options. You can't just use a stdint.h written for a different compiler/os/etc. combination. At least with OpenSSL 1.0.2, OpenSSL can be compiled on systems without stdint.h, maybe some of the logic in the new build system mistakenly thinks Solaris/SunOS provides stdint.h even when it doesn't. 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
[openssl-users] FW: problem with missing STDINT.H file
The attached text file is a snippet from attempting to install openssl-1.1.0c on a Solaris 8 machine. As can be seen, failed when could not be found. There is no such file anywhere on this machine. As root, searched from the root directory for the file. Do have in more than one location, /usr/include /opt/SUNWSpro/prod/include/CC/std /opt/SUNWSpro/prod/include/CC/stlport4 I found this file on GITHUB. Can it be downloaded and put in /usr/include or /opt/SUNWspro/prod/CC/std. Thank you for your assistance James James Carter PhD ES34 Bldg 4487 Rm B117 Optics & Imaging Branch Space Systems Department Marshall Space Flight Center, AL 35812 P: 256-544-3469 C: 256-425-2068 F: 256-544-5629 script_tail Description: script_tail -- openssl-users mailing list To unsubscribe: https://mta.openssl.org/mailman/listinfo/openssl-users