On Thu, Mar 25, 2021 at 2:45 PM Niels Möller nisse@lysator.liu.se wrote:
Jeffrey Walton noloader@gmail.com writes:
This is building Nettle 3.7.2 on a PowerMac with OS X 10.5:
/usr/bin/cc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -mlong-double-64 -fno-common -maltivec -fPIC -pthread -ggdb3 -Wno-pointer-sign -Wall -W -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wpointer-arith -Wbad-function-cast -Wnested-externs -fPIC -MT xts-aes128.o -MD -MP -MF xts-aes128.o.d -c xts-aes128.c \ && true xts.c: In function ‘xts_shift’: xts.c:59: warning: integer constant is too large for ‘long’ type xts.c:59: warning: integer constant is too large for ‘long’ type xts.c:60: warning: integer constant is too large for ‘long’ type xts.c:60: warning: integer constant is too large for ‘long’ type xts.c:60: warning: integer constant is too large for ‘long’ type
On OS X 10.5, you have to use unsigned long long and the ull suffix.
This is confusing. The xts_shift function is not in nettle-3.7.2, as far as I can tell, it was deleted long ago in https://git.lysator.liu.se/nettle/nettle/-/commit/685cc919a37b60d3f81dd569bf....
Maybe you should add a configure test to see whether you need the ull suffix.
The current related code uses UINT64_C for the 64-bit constants. No configure test needed.
My bad, that came from 3.5.
Sorry about that.
Jeff