On Tue, Oct 29, 2019 at 3:01 PM Niels Möller <[email protected]> wrote:
>
> Jeffrey Walton <[email protected]> writes:
>
> > Hi Everyone,
> >
> > I'm building Nettle 3.5.1 on an old PowerMac G5.
> >
> > gcc -I. -I/usr/local/include -DNDEBUG -DHAVE_CONFIG_H -g2 -O2 -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
>
> This looks like it may be a real problem on big-endian 32-bit machines.
> A bit surprised that tests don't fail, the ci runs tests on (emulated)
> mips, and I also did pre-release tests on m68k.
>
> In the code on master, this code is moved to block-internal.h, and use
> UINT64_C for the constants.
Yeah, I think you need this on the old Apple machines with the
modified GCC 4.2.1:
0x8700000000000000ull
Wrapping it in a macro that adds the ULL may be a good idea. Something like:
#if (_LP64 || __LP64__)
#define UINT64_C (x) x
#else
#define UINT64_C (x) xull
#endif
Or you could switch to 32-bit data types for the GF Double function.
32-bit does not materially affect the double. You lose something like
0.002 cpb in the 32-bit version.
Jeff
_______________________________________________
nettle-bugs mailing list
[email protected]
http://lists.lysator.liu.se/mailman/listinfo/nettle-bugs