e$BCf@n$H$$$$$^$9!#e(B
ruby-core:12895 e$B$Ge(B Laurent e$B$,e(B ruby 1.8 e$B$K$D$$$Fe(B
words-bigendian-from-arch.diff: This patch moves some code that was
only effective for NeXT systems, for both Mac OS X and NeXT.
WORDS_BIGENDIAN isn’t trusted from configure, but instead we use
BIG_ENDIAN. This is to make sure you can build Ruby for both ppc
and i386 architectures (as a fat binary) on ppc, then use the binary
on i386 without getting endianness problems.
e$B$H=q$$$F$$$^$9$,!"$3$l$Oe(B trunk e$B$K$b$"$F$O$^$j$^$9!#e(B
ruby-dev:31626 e$B$Ne(B strtod e$B$N7o0JMh!"5$$K$J$C$F$$$?$N$G$9$,!"e(B
Intel Mac e$B$Ge(B -arch i386 -arch ppc e$B$r;XDj$7$Fe(B make
e$B$7$F$_$k$He(B
WORDS_BIGENDIAN e$B$Oe(B i386 e$B$He(B ppc e$B$N%P%$%J%j$N$I$A$i$G$be(B
define e$B$5$l$F$$$J$$$3$H$r3NG’$7$^$7$?!#e(B
e$B$7$?$,$C$F!"e(BWORDS_BIGENDIAN e$B$rMxMQ$7$F$$$kItJ,$O!"e(B
fat binary e$B$G$O$A$c$s$HF0:n$7$F$$$J$$$O$:$@$H;W$$$^$9!#e(B
Index: include/ruby/defines.h
— include/ruby/defines.h (revision 13787)
+++ include/ruby/defines.h (working copy)
@@ -106,6 +106,16 @@
#endif
#endif
+#if defined(NeXT) || defined(APPLE)
+/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler
flag may
- result in a different endian. Instead trust BIG_ENDIAN and
-
LITTLE_ENDIAN which are set correctly by -arch. */
+#undef WORDS_BIGENDIAN
+#ifdef BIG_ENDIAN
+#define WORDS_BIGENDIAN
+#endif
+#endif
#ifdef NeXT
/* NextStep, OpenStep, Rhapsody /
#ifndef S_IRUSR
@@ -159,13 +169,6 @@
#ifndef S_ISREG
#define S_ISREG(mode) (((mode) & (0170000)) == (0100000))
#endif
-/ Do not trust WORDS_BIGENDIAN from configure since -arch compiler
flag may
- result in a different endian. Instead trust BIG_ENDIAN and
-
LITTLE_ENDIAN which are set correctly by -arch. /
-#undef WORDS_BIGENDIAN
-#ifdef BIG_ENDIAN
-#define WORDS_BIGENDIAN
-#endif
#ifndef APPLE
/ NextStep, OpenStep (but not Rhapsody) */
#ifndef GETPGRP_VOID