summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bench/wtperf/wtperf.h4
-rw-r--r--dist/s_define.list1
-rw-r--r--ext/compressors/lz4/lz4_compress.c4
-rw-r--r--ext/compressors/snappy/snappy_compress.c4
-rw-r--r--src/include/swap.h2
-rw-r--r--src/include/wt_internal.h4
-rw-r--r--src/support/hash_city.c1
-rw-r--r--src/support/hash_fnv.c1
-rw-r--r--test/packing/intpack-test.c4
-rw-r--r--test/packing/intpack-test2.c4
-rw-r--r--test/packing/intpack-test3.c4
-rw-r--r--test/packing/packing-test.c4
12 files changed, 20 insertions, 17 deletions
diff --git a/bench/wtperf/wtperf.h b/bench/wtperf/wtperf.h
index f8d5a5c0bc9..120b93262b4 100644
--- a/bench/wtperf/wtperf.h
+++ b/bench/wtperf/wtperf.h
@@ -29,6 +29,8 @@
#ifndef HAVE_WTPERF_H
#define HAVE_WTPERF_H
+#include <wt_internal.h>
+
#ifndef _WIN32
#include <sys/time.h>
#endif
@@ -56,8 +58,6 @@
#include <unistd.h>
#endif
-#include <wt_internal.h>
-
#ifdef _WIN32
#include "windows_shim.h"
#endif
diff --git a/dist/s_define.list b/dist/s_define.list
index ff24e3db822..ea0799f8d78 100644
--- a/dist/s_define.list
+++ b/dist/s_define.list
@@ -55,4 +55,5 @@ WT_WITH_LOCK
__F
__WIREDTIGER_EXT_H_
__WIREDTIGER_H_
+__WT_INTERNAL_H
__wt_bswap16
diff --git a/ext/compressors/lz4/lz4_compress.c b/ext/compressors/lz4/lz4_compress.c
index 3e6609beb80..062307b721a 100644
--- a/ext/compressors/lz4/lz4_compress.c
+++ b/ext/compressors/lz4/lz4_compress.c
@@ -26,13 +26,13 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <wt_internal.h>
+
#include <lz4.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <wt_internal.h>
-
/* Local compressor structure. */
typedef struct {
WT_COMPRESSOR compressor; /* Must come first */
diff --git a/ext/compressors/snappy/snappy_compress.c b/ext/compressors/snappy/snappy_compress.c
index d1bd2e1813c..fcefb8bb575 100644
--- a/ext/compressors/snappy/snappy_compress.c
+++ b/ext/compressors/snappy/snappy_compress.c
@@ -26,13 +26,13 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
+#include <wt_internal.h>
+
#include <snappy-c.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#include <wt_internal.h>
-
/* Local compressor structure. */
typedef struct {
WT_COMPRESSOR compressor; /* Must come first */
diff --git a/src/include/swap.h b/src/include/swap.h
index 15b7a0d9df9..2040ca88a77 100644
--- a/src/include/swap.h
+++ b/src/include/swap.h
@@ -7,7 +7,7 @@
*/
#if defined(_MSC_VER) && (_MSC_VER >= 1300)
-#include <cstdlib>
+#include <stdlib.h>
#define __wt_bswap16(v) _byteswap_ushort(v)
#define __wt_bswap32(v) _byteswap_ulong(v)
#define __wt_bswap64(v) _byteswap_uint64(v)
diff --git a/src/include/wt_internal.h b/src/include/wt_internal.h
index 7ff93b86f92..4533c8cbca0 100644
--- a/src/include/wt_internal.h
+++ b/src/include/wt_internal.h
@@ -6,6 +6,9 @@
* See the file LICENSE for redistribution information.
*/
+#ifndef __WT_INTERNAL_H
+#define __WT_INTERNAL_H
+
#if defined(__cplusplus)
extern "C" {
#endif
@@ -368,3 +371,4 @@ union __wt_rand_state;
#if defined(__cplusplus)
}
#endif
+#endif /* !__WT_INTERNAL_H */
diff --git a/src/support/hash_city.c b/src/support/hash_city.c
index f12bfc9a70c..7a700aa809c 100644
--- a/src/support/hash_city.c
+++ b/src/support/hash_city.c
@@ -57,7 +57,6 @@
* compromising on hash quality.
*/
-#include <string.h>
#include "wt_internal.h"
/*
diff --git a/src/support/hash_fnv.c b/src/support/hash_fnv.c
index 35e7e5f3a73..83dd2574099 100644
--- a/src/support/hash_fnv.c
+++ b/src/support/hash_fnv.c
@@ -83,7 +83,6 @@
* Share and Enjoy! :-)
*/
-#include <stdlib.h>
#include "wt_internal.h"
/*
diff --git a/test/packing/intpack-test.c b/test/packing/intpack-test.c
index a48f9fc4fe4..08cc3807725 100644
--- a/test/packing/intpack-test.c
+++ b/test/packing/intpack-test.c
@@ -26,10 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <assert.h>
-
#include "wt_internal.h" /* For __wt_XXX */
+#include <assert.h>
+
int
main(void)
{
diff --git a/test/packing/intpack-test2.c b/test/packing/intpack-test2.c
index 68f794f0bf5..7555d2724e7 100644
--- a/test/packing/intpack-test2.c
+++ b/test/packing/intpack-test2.c
@@ -26,10 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <assert.h>
-
#include "wt_internal.h" /* For __wt_XXX */
+#include <assert.h>
+
int
main(void)
{
diff --git a/test/packing/intpack-test3.c b/test/packing/intpack-test3.c
index 2bce88c3568..2ebc01f9e2e 100644
--- a/test/packing/intpack-test3.c
+++ b/test/packing/intpack-test3.c
@@ -26,10 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <assert.h>
-
#include "wt_internal.h" /* For __wt_XXX */
+#include <assert.h>
+
void test_value(int64_t);
void test_spread(int64_t, int64_t, int64_t);
diff --git a/test/packing/packing-test.c b/test/packing/packing-test.c
index 1d2194bee50..9b7105d7d4a 100644
--- a/test/packing/packing-test.c
+++ b/test/packing/packing-test.c
@@ -26,10 +26,10 @@
* OTHER DEALINGS IN THE SOFTWARE.
*/
-#include <assert.h>
-
#include "wt_internal.h" /* For __wt_XXX */
+#include <assert.h>
+
static void
check(const char *fmt, ...)
{