Actually define WORDS_BIGENDIAN on big endian machines.
authorTilman Sauerbeck <tilman@code-monkey.de>
Thu, 29 Mar 2007 20:05:12 +0000 (22:05 +0200)
committerTilman Sauerbeck <tilman@code-monkey.de>
Thu, 29 Mar 2007 20:05:12 +0000 (22:05 +0200)
This unbreaks the whole thing on BE boxes.

Rakefile

index c743d1a27847d553e642ff978caa812668135e8e..178c69fc060454d05f46ce2149bf0c17bfe536ce 100644 (file)
--- a/Rakefile
+++ b/Rakefile
@@ -46,6 +46,10 @@ task :pre_ext => [:configure] do
                config.eet.cflags
        ]
 
+       if [0xff].pack("s") == "\x00\xff"
+               ext.env.update(:defines => "WORDS_BIGENDIAN")
+       end
+
        ext.env.update(:cflags => cflags)
 end