Changeset 14175 for gsdl/trunk/perllib/util.pm
- Timestamp:
- 2007-06-13T13:26:29+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/util.pm
r11179 r14175 711 711 # test to see whether this is a big or little endian machine 712 712 sub is_little_endian { 713 return (ord(substr(pack("s",1), 0, 1)) == 1); 713 # To determine the name of the operating system, the variable $^O is a cheap alternative to pulling it out of the Config module; 714 # What we do here is, if it is a Macintosh machine (i.e. the Darwin operating system), regardless it is running on the IBM power-pc cpu or it is the x86 Intel-based chip with a power-pc emulator running on top of it, it requires the big-endian data format in the gdbm database file, we make the file extension .bdb; otherwise it's .ldb extension. 715 716 #return 0 if $^O =~ /^darwin$/i; 717 return 0 if $ENV{'GSDLOS'} =~ /^darwin$/i; 718 return (ord(substr(pack("s",1), 0, 1)) == 1); 714 719 } 715 720
Note:
See TracChangeset
for help on using the changeset viewer.