瀏覽代碼

WORDS_BIGENDIAN instead of IS_BIG_ENDIAN

David Rose 23 年之前
父節點
當前提交
87e0b810be
共有 2 個文件被更改,包括 5 次插入7 次删除
  1. 1 1
      direct/src/dcparser/dcAtomicField.cxx
  2. 4 6
      direct/src/dcparser/dcbase.h

+ 1 - 1
direct/src/dcparser/dcAtomicField.cxx

@@ -297,7 +297,7 @@ format_default_value(double num, string &formatted) const {
   case ST_float64:
     // This may not be fully portable.
     formatted = string((char *)&real_value, 8);
-#ifdef IS_BIG_ENDIAN
+#ifdef WORDS_BIGENDIAN
     {
       // Reverse the byte ordering for big-endian machines.
       string str;

+ 4 - 6
direct/src/dcparser/dcbase.h

@@ -93,12 +93,10 @@ using namespace std;
 // string instead.
 typedef string Filename;
 
-// Panda defines IS_BIG_ENDIAN or IS_LITTLE_ENDIAN as appropriate.
-// Outside of panda, you'll have to do it yourself.  If neither is
-// defined, we'll assume IS_LITTLE_ENDIAN.
-#if !defined(IS_BIG_ENDIAN) && !defined(IS_LITTLE_ENDIAN)
-#define IS_LITTLE_ENDIAN
-#endif
+// Panda defines WORDS_BIGENDIAN on a bigendian machine; otherwise,
+// the machine is assumed to be littleendian.  Outside of Panda,
+// you're responsible for defining this yourself if necessary.
+//#define WORDS_BIGENDIAN
 
 #include <vector>
 #include <map>