diff --git a/c_src/wiredtiger-build.patch b/c_src/wiredtiger-build.patch index cb619ff..22628e6 100644 --- a/c_src/wiredtiger-build.patch +++ b/c_src/wiredtiger-build.patch @@ -3,21 +3,21 @@ index 6d78823..2122cf8 100644 --- a/ext/compressors/snappy/Makefile.am +++ b/ext/compressors/snappy/Makefile.am @@ -2,5 +2,6 @@ AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)/src/include - + lib_LTLIBRARIES = libwiredtiger_snappy.la libwiredtiger_snappy_la_SOURCES = snappy_compress.c -libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -+libwiredtiger_snappy_la_CFLAGS = -I$(src_builddir)/../../system/include -+libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -L$(src_builddir)/../../system/lib -Wl,-rpath,lib/wterl-0.9.0/priv:lib/wterl/priv:priv ++libwiredtiger_snappy_la_CFLAGS = -I$(abs_top_builddir)/../../system/include ++libwiredtiger_snappy_la_LDFLAGS = -avoid-version -module -L$(abs_top_builddir)/../../system/lib -Wl,-rpath,lib/wterl-0.9.0/priv:lib/wterl/priv:priv libwiredtiger_snappy_la_LIBADD = -lsnappy diff --git a/src/support/cksum.c b/src/support/cksum.c index 7e9befe..b924db7 100644 --- a/src/support/cksum.c +++ b/src/support/cksum.c @@ -27,6 +27,13 @@ - + #include "wt_internal.h" - + +#if defined(__amd64) || defined(__x86_64) +#define USE_HARDWARE_CRC32 1 +#else @@ -33,7 +33,7 @@ index 7e9befe..b924db7 100644 #endif }; +#endif /* USE_HARDWARE_CRC32 */ - + /* * __wt_cksum -- @@ -1106,15 +1114,29 @@ __wt_cksum(const void *chunk, size_t len) @@ -55,7 +55,7 @@ index 7e9befe..b924db7 100644 #endif +#endif + } - + /* Checksum in 8B chunks. */ for (nqwords = len / sizeof(uint64_t); nqwords; nqwords--) { +#ifdef USE_HARDWARE_CRC32 @@ -73,7 +73,7 @@ index 7e9befe..b924db7 100644 #endif +#endif } - + /* Checksum trailing bytes one byte at a time. */ + for (len &= 0x7; len > 0; ++p, len--) { +#ifdef USE_HARDWARE_CRC32 @@ -90,7 +90,7 @@ index 7e9befe..b924db7 100644 +#endif +#endif + } - + +#ifdef WORDS_BIGENDIAN /* Do final byte swap to produce a result identical to little endian */ crc =