浏览代码

A bug about PROTOBUF_LITTLE_ENDIAN remain undefined on MSVC x64

LitingLin 10 年之前
父节点
当前提交
224010c775
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/google/protobuf/io/coded_stream.h

+ 1 - 1
src/google/protobuf/io/coded_stream.h

@@ -112,7 +112,7 @@
 #include <string>
 #include <utility>
 #ifdef _MSC_VER
-  #if defined(_M_IX86) && \
+  #if (defined(_M_IX86) || defined(_M_AMD64)) && \
       !defined(PROTOBUF_DISABLE_LITTLE_ENDIAN_OPT_FOR_TEST)
     #define PROTOBUF_LITTLE_ENDIAN 1
   #endif