summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Boros <ian.boros@10gen.com>2019-01-10 09:42:23 -0500
committerIan Boros <ian.boros@10gen.com>2019-01-10 09:42:23 -0500
commit8df5c814aa3dffffc18d66ec7a27efff3659bfcf (patch)
treebeee332e6ae05c9087f6300dcd2cdd707cae36d0 /src
parent005c5d104d50c451061ddbf159a7df3498caf3ef (diff)
downloadmongo-8df5c814aa3dffffc18d66ec7a27efff3659bfcf.tar.gz
Revert "SERVER-28073 [Snappy-1.1.2 Patch]: prefer memcpy to undefined reinterpret_cast for UNALIGNED_LOAD/STORE functions"
This reverts commit b52a4171ec2139856c7a058aec2bab525d7575dd.
Diffstat (limited to 'src')
-rw-r--r--src/third_party/snappy-1.1.7/snappy-stubs-internal.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/third_party/snappy-1.1.7/snappy-stubs-internal.h b/src/third_party/snappy-1.1.7/snappy-stubs-internal.h
index 7b29991d1a2..cb605f82d0f 100644
--- a/src/third_party/snappy-1.1.7/snappy-stubs-internal.h
+++ b/src/third_party/snappy-1.1.7/snappy-stubs-internal.h
@@ -110,9 +110,7 @@ static const int64 kint64max = static_cast<int64>(0x7FFFFFFFFFFFFFFFLL);
// x86, PowerPC, and ARM64 can simply do these loads and stores native.
-// MongoDB customization: Prefer memcpy on all architectures. Using reinterpret_cast is undefined
-// behavior.
-#if 0 && defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \
+#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) || \
defined(__aarch64__)
#define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
@@ -141,8 +139,7 @@ static const int64 kint64max = static_cast<int64>(0x7FFFFFFFFFFFFFFFLL);
// we can tell it that a _struct_ is unaligned, which has the same effect,
// so we do that.
-// MongoDB customization: See memcpy notes above
-#elif 0 && defined(__arm__) && \
+#elif defined(__arm__) && \
!defined(__ARM_ARCH_4__) && \
!defined(__ARM_ARCH_4T__) && \
!defined(__ARM_ARCH_5__) && \