aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-08-22 10:59:39 -0700
committerGitHub <noreply@github.com>2017-08-22 10:59:39 -0700
commit09fd1259c8b76024b1365463c24762cd1b5b6144 (patch)
treeeb224bbaa5f5935c701af12b6f93d397c23086cd
parent92d768c11380a57bc54e9a11c8f53d51bd92c6f6 (diff)
parentc27b56c6927642157f0c392faca6c9fcba9750d0 (diff)
downloadprotobuf-09fd1259c8b76024b1365463c24762cd1b5b6144.tar.gz
protobuf-09fd1259c8b76024b1365463c24762cd1b5b6144.tar.bz2
protobuf-09fd1259c8b76024b1365463c24762cd1b5b6144.zip
Merge pull request #3540 from drivehappy/3.4.x_clang_cleanup_2
Merge pull request #3494 from drivehappy/clang_warning_macro
-rw-r--r--src/google/protobuf/stubs/port.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/port.h b/src/google/protobuf/stubs/port.h
index dbc29861..0f304c6b 100644
--- a/src/google/protobuf/stubs/port.h
+++ b/src/google/protobuf/stubs/port.h
@@ -256,8 +256,11 @@ static const uint64 kuint64max = GOOGLE_ULONGLONG(0xFFFFFFFFFFFFFFFF);
# define GOOGLE_PROTOBUF_USE_UNALIGNED 0
#else
// x86 and x86-64 can perform unaligned loads/stores directly.
-# define GOOGLE_PROTOBUF_USE_UNALIGNED defined(_M_X64) || \
- defined(__x86_64__) || defined(_M_IX86) || defined(__i386__)
+# if defined(_M_X64) || defined(__x86_64__) || defined(_M_IX86) || defined(__i386__)
+# define GOOGLE_PROTOBUF_USE_UNALIGNED 1
+# else
+# define GOOGLE_PROTOBUF_USE_UNALIGNED 0
+# endif
#endif
#if GOOGLE_PROTOBUF_USE_UNALIGNED