From: Aaron Patterson Date: 2005-12-06T04:35:43+09:00 Subject: Re: Determining endianness in extconf.rb On Tue, Dec 06, 2005 at 04:21:37AM +0900, Daniel Berger wrote: [snip] > Modify $CFLAGS or $CPPFLAGS directly: > > # extconf.rb > if [1].pack("I") == [1].pack("N") > $CFLAGS += " -DBIG_ENDIAN" # note the leading space > end > > /* In your C code somewhere */ > #ifdef BIG_ENDIAN > /* Do something */ > #endif > > Regards, > > Dan > Thank you for the help! --Aaron