david@localhost ~ $ cat test64.c #include<stdio.h> int main() { long i = 0x0123456789abcdef; printf("%d bit long: %x\n", 8*sizeof(i), i); } david@localhost ~ $ gcc test64.c -o test64 david@localhost ~ $ ./test64 64 bit long: 89abcdef
has nothing to do with coreutils afaict
you should really build with warnings enabled (-Wall) then you should read the printf(3) manpage %x takes an unsigned int and since you did not include any length modifiers, printf() only shows (unsigned int)(0x0123456789abcdef) which correctly evaluates to 0x89abcdef