an oldie but a goodie .. ISO C90 does not support 'long long'

Tomas Mraz tomas at openssl.org
Wed Nov 2 07:30:10 UTC 2022


No, long long and unsigned long long is required and it was required
for quite some time. The code is mostly C90 but not strictly.

I suppose on platforms with 64bit long type we could make it work
without long long though. Pull requests are welcome.

Tomas Mraz, OpenSSL


On Tue, 2022-11-01 at 22:52 +0000, Dennis Clarke via openssl-users
wrote:
> 
> Good day :
> 
>       This always bites me when I try strict C90 :
> 
> In file included from include/openssl/x509.h:41,
>                   from apps/include/apps.h:29,
>                   from apps/lib/app_libctx.c:10:
> include/openssl/sha.h:106:37: error: ISO C90 does not support 'long 
> long' [-Wlong-long]
>    106 | #   define SHA_LONG64 unsigned long long
>        |                                     ^~~~
> include/openssl/sha.h:110:5: note: in expansion of macro 'SHA_LONG64'
>    110 |     SHA_LONG64 h[8];
>        |     ^~~~~~~~~~
> include/openssl/sha.h:106:37: error: ISO C90 does not support 'long 
> long' [-Wlong-long]
>    106 | #   define SHA_LONG64 unsigned long long
>        |                                     ^~~~
> include/openssl/sha.h:111:5: note: in expansion of macro 'SHA_LONG64'
>    111 |     SHA_LONG64 Nl, Nh;
>        |     ^~~~~~~~~~
> include/openssl/sha.h:106:37: error: ISO C90 does not support 'long 
> long' [-Wlong-long]
>    106 | #   define SHA_LONG64 unsigned long long
>        |                                     ^~~~
> include/openssl/sha.h:113:9: note: in expansion of macro 'SHA_LONG64'
>    113 |         SHA_LONG64 d[SHA_LBLOCK];
>        |         ^~~~~~~~~~
> gmake[1]: *** [Makefile:3989: apps/lib/libapps-lib-app_libctx.o]
> Error 1
> gmake[1]: Leaving directory '/opt/bw/build/openssl-
> 3.0.7_debian_ppc64.002'
> make: *** [Makefile:2958: build_sw] Error 2
> 
> 
> etc etc ...
> 
> I can just as neatly go to C11 or some such but I thought the whole
> code
>   base was C90 clean ?  At least it was.
> 
> 
> 
> 

-- 
Tomáš Mráz, OpenSSL



More information about the openssl-users mailing list