Menu

#6 -swab needed for amd64

open
nobody
None
5
2007-07-01
2007-07-01
No

It seems that the -swab option is also needed for the amd64 platform.

I see that the check for endianness is
hardcoded to only x86 architectures, and that this check
is done with the /bin/arch command. /bin/arch is not
available everywhere, for instance not on FreeBSD. I
think it's more portable to ask the perl config itself:

$ perl -MConfig -le 'print $Config{archname}'
amd64-freebsd

Even the endianness information is available within perl:

$ perl -MConfig -le 'print $Config{byteorder}'
12345678

On a 32bit machine the result would be 1234, on a 32 bit
big endian machine it would be 4321.

Regards,
Slaven

Discussion


Log in to post a comment.

Monday.com Logo