Răsfoiți Sursa

endian badness

David Rose 23 ani în urmă
părinte
comite
d6ed3123bb

+ 3 - 3
panda/src/express/bigEndian.h

@@ -33,10 +33,10 @@
 //               unchanged for big-endian machines.
 ////////////////////////////////////////////////////////////////////
 
-#ifdef IS_LITTLE_ENDIAN
-typedef ReversedNumericData BigEndian;
-#else
+#ifdef WORDS_BIGENDIAN
 typedef NativeNumericData BigEndian;
+#else
+typedef ReversedNumericData BigEndian;
 #endif
 
 #endif

+ 4 - 4
panda/src/express/littleEndian.h

@@ -19,7 +19,7 @@
 #ifndef LITTLEENDIAN_H
 #define LITTLEENDIAN_H
 
-#include <pandabase.h>
+#include "pandabase.h"
 
 #include "numeric_types.h"
 #include "nativeNumericData.h"
@@ -33,10 +33,10 @@
 //               unchanged for little-endian machines.
 ////////////////////////////////////////////////////////////////////
 
-#ifdef IS_LITTLE_ENDIAN
-typedef NativeNumericData LittleEndian;
-#else
+#ifdef WORDS_BIGENDIAN
 typedef ReversedNumericData LittleEndian;
+#else
+typedef NativeNumericData LittleEndian;
 #endif
 
 #endif

+ 0 - 10
panda/src/express/numeric_types.h

@@ -27,10 +27,6 @@
 // Later (especially for non-NSPR platforms) we'll have to do the work
 // ourselves.
 
-// This file also defines one of the macros IS_BIG_ENDIAN or
-// IS_LITTLE_ENDIAN, as appropriate.  (In the case of NSPR, these are
-// defined automatically.)
-
 
 #ifdef HAVE_NSPR
 
@@ -71,12 +67,6 @@ typedef unsigned long PN_uint32;
 
 typedef double PN_float64;
 
-#ifdef WORDS_BIGENDIAN
-#undef IS_LITTLE_ENDIAN
-#else
-#define IS_LITTLE_ENDIAN 1
-#endif
-
 #endif  // HAVE_NSPR
 
 #endif