Re: [Integrit-devel] Fixing security/integrit build errors on sparc64
Brought to you by:
ecashin
|
From: Jos B. <jo...@ca...> - 2005-09-13 18:24:32
|
See http://pointyhat.freebsd.org/errorlogs/sparc64-errorlogs/e.6.2005060522/integrit-3.02.00.log gnupg/md5.c has: p = hd->buf; #ifdef BIG_ENDIAN_HOST #define X(a) do { *p++ = hd->a ; *p++ = hd->a >> 8; \ *p++ = hd->a >> 16; *p++ = hd->a >> 24; } while(0) #else /* little endian */ /*#define X(a) do { *(u32*)p = hd->##a ; p += 4; } while(0)*/ /* Unixware's cpp doesn't like the above construct so we do it his way: * (reported by Allan Clark) */ #define X(a) do { *(u32*)p = (*hd).a ; p += 4; } while(0) #endif X(A); X(B); X(C); X(D); #undef X I could be wrong but it looks like the BIG_ENDIAN_HOST case is broken (sparc64 is big endian); there, each occurrence of `hd->a' needs to be replaced with `hd->##a' (i.e. use the paste operator). But I have no way of testing this. -- Jos Backus jos at catnook.com |