#13 isbigendian fails on 64-bit platforms (e.g. Alpha)

core (120)

the isbigendian function in Basic/Core/Dev.pm, used in setting up PDL for a build,
fails on 64-bit platforms. For instance, on my Alpha (running Tru64 UNIX version 5.0) $byteorder = "12345678" --
clearly little-endian, but the routine doesn't handle it properly, so the install
ultimately fails. When i just brutally hacked the routine to always return 0, the build worked fine, and the tests all worked acceptibly except for flexraw.

My username is jhbrown@ai.mit.edu, should you wish to contact me.

# big/little endian?
sub isbigendian {
use Config;
my $byteorder = $Config{byteorder} ||
die "ERROR: Unable to find 'byteorder' in perl's Config\n";
return 1 if $byteorder eq "4321";
return 0 if $byteorder eq "1234";
die "ERROR: PDL does not understand your machine's byteorder ($byteorder)\n";


  • Doug Burke

    Doug Burke - 2001-01-17

    This has been fixed in the latest CVS version
    of PDL.

  • Doug Hunt

    Doug Hunt - 2001-01-18

    It looks like Jim Edwards fixed it.

    --Doug Hunt

  • Doug Hunt

    Doug Hunt - 2001-01-18
    • assigned_to: nobody --> jedwards
    • labels: 100100 --> core
    • status: open --> open-fixed
  • Christian Soeller

    • status: open-fixed --> closed-fixed

Log in to post a comment.