diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2014-10-15 11:47:13 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2014-10-15 11:47:13 +1100 |
commit | 2bca93d54b3b3c3ad01f1fe932a783e83495701e (patch) | |
tree | bc1338268962976bbe00c1af9ffcd7a52e808cbe /build_posix | |
parent | 01adce5055f2c994e35ace706e3cae4d30e60553 (diff) | |
parent | ba4f6023c5c580b5f3be1d5538f57c03a8c49fe8 (diff) | |
download | mongo-2bca93d54b3b3c3ad01f1fe932a783e83495701e.tar.gz |
Merge branch 'develop' into json-load
Conflicts:
dist/s_string.ok
src/include/extern.h
src/utilities/util_load.c
Diffstat (limited to 'build_posix')
-rw-r--r-- | build_posix/Make.base | 1 | ||||
-rw-r--r-- | build_posix/aclocal/types.m4 | 117 | ||||
-rw-r--r-- | build_posix/configure.ac.in | 2 |
3 files changed, 13 insertions, 107 deletions
diff --git a/build_posix/Make.base b/build_posix/Make.base index fee456f9e1e..51a8e77cebe 100644 --- a/build_posix/Make.base +++ b/build_posix/Make.base @@ -23,7 +23,6 @@ wt_SOURCES =\ src/utilities/util_create.c \ src/utilities/util_drop.c \ src/utilities/util_dump.c \ - src/utilities/util_getopt.c \ src/utilities/util_list.c \ src/utilities/util_load.c \ src/utilities/util_load_json.c \ diff --git a/build_posix/aclocal/types.m4 b/build_posix/aclocal/types.m4 index 844c8eadc73..439034c89d2 100644 --- a/build_posix/aclocal/types.m4 +++ b/build_posix/aclocal/types.m4 @@ -1,122 +1,21 @@ -# AM_SIGNED_TYPES, AM_UNSIGNED_TYPES -- -# Search standard type names for something of the same size and -# signed-ness as the type we want to declare. -# -# $1 AC_SUBST variable -# $2 typedef name -# $3 number of bytes -AC_DEFUN([AM_SIGNED_TYPES], [ - case "$3" in - "$ac_cv_sizeof_int") - $1="typedef int $2;";; - "$ac_cv_sizeof_char") - $1="typedef char $2;";; - "$ac_cv_sizeof_short") - $1="typedef short $2;";; - "$ac_cv_sizeof_long") - $1="typedef long $2;";; - "$ac_cv_sizeof_long_long") - $1="typedef long long $2;";; - *) - AC_MSG_ERROR([No signed $3-byte type found]);; - esac]) -]) -AC_DEFUN([AM_UNSIGNED_TYPES], [ - case "$3" in - "$ac_cv_sizeof_unsigned_int") - $1="typedef unsigned int $2;";; - "$ac_cv_sizeof_unsigned_char") - $1="typedef unsigned char $2;";; - "$ac_cv_sizeof_unsigned_short") - $1="typedef unsigned short $2;";; - "$ac_cv_sizeof_unsigned_long") - $1="typedef unsigned long $2;";; - "$ac_cv_sizeof_unsigned_long_long") - $1="typedef unsigned long long $2;";; - *) - AC_MSG_ERROR([No unsigned $3-byte type found]);; - esac]) -]) # AM_TYPES -- -# Create any missing types. +# Check for missing types, create substitutes where we can. AC_DEFUN([AM_TYPES], [ # Basic list of include files that might have types. We also use # as the list of includes directly included by wiredtiger.h. std_includes=" #include <sys/types.h> +#include <inttypes.h> #include <stdarg.h> #include <stdint.h> #include <stdio.h>" AC_SUBST(wiredtiger_includes_decl) wiredtiger_includes_decl="$std_includes" - # Look for variable-sized type names, and if we don't find them, - # create our own. - AC_SUBST(u_char_decl) - AC_CHECK_TYPE(u_char,, - [u_char_decl="typedef unsigned char u_char;"], $std_includes) - AC_SUBST(u_short_decl) - AC_CHECK_TYPE(u_short,, - [u_short_decl="typedef unsigned short u_short;"], $std_includes) - AC_SUBST(u_int_decl) - AC_CHECK_TYPE(u_int,, - [u_int_decl="typedef unsigned int u_int;"], $std_includes) - AC_SUBST(u_long_decl) - AC_CHECK_TYPE(u_long,, - [u_long_decl="typedef unsigned long u_long;"], $std_includes) - AC_SUBST(u_quad_decl) - AC_CHECK_TYPE(u_quad,, - [u_quad_decl="typedef unsigned long long u_quad;"], $std_includes) - - # Look for fixed-size type names, and if we don't find them, create - # our own. - # - # First, figure out the sizes of the standard types. - AC_CHECK_SIZEOF(char,, $std_includes) - AC_CHECK_SIZEOF(unsigned char,, $std_includes) - AC_CHECK_SIZEOF(short,, $std_includes) - AC_CHECK_SIZEOF(unsigned short,, $std_includes) - AC_CHECK_SIZEOF(int,, $std_includes) - AC_CHECK_SIZEOF(unsigned int,, $std_includes) - AC_CHECK_SIZEOF(long,, $std_includes) - AC_CHECK_SIZEOF(unsigned long,, $std_includes) - AC_CHECK_SIZEOF(long long,, $std_includes) - AC_CHECK_SIZEOF(unsigned long long,, $std_includes) - AC_CHECK_SIZEOF(char *,, $std_includes) - - # Second, check for the types we really want, and if we don't find - # them, search for something of the same size and signed-ness. - AC_SUBST(u_int8_decl) - AC_CHECK_TYPE(u_int8_t,, [ - AM_UNSIGNED_TYPES(u_int8_decl, u_int8_t, 1)], $std_includes) - AC_SUBST(int8_decl) - AC_CHECK_TYPE(int8_t,, [ - AM_SIGNED_TYPES(int8_decl, int8_t, 1)], $std_includes) - AC_SUBST(u_int16_decl) - AC_CHECK_TYPE(u_int16_t,, [ - AM_UNSIGNED_TYPES(u_int16_decl, u_int16_t, 2)], $std_includes) - AC_SUBST(int16_decl) - AC_CHECK_TYPE(int16_t,, [ - AM_SIGNED_TYPES(int16_decl, int16_t, 2)], $std_includes) - AC_SUBST(u_int32_decl) - AC_CHECK_TYPE(u_int32_t,, [ - AM_UNSIGNED_TYPES(u_int32_decl, u_int32_t, 4)], $std_includes) - AC_SUBST(int32_decl) - AC_CHECK_TYPE(int32_t,, [ - AM_SIGNED_TYPES(int32_decl, int32_t, 4)], $std_includes) - AC_SUBST(u_int64_decl) - AC_CHECK_TYPE(u_int64_t,, [ - AM_UNSIGNED_TYPES(u_int64_decl, u_int64_t, 8)], $std_includes) - AC_SUBST(int64_decl) - AC_CHECK_TYPE(int64_t,, [ - AM_SIGNED_TYPES(int64_decl, int64_t, 8)], $std_includes) - - # We additionally require FILE, off_t, pid_t, size_t, ssize_t, - # time_t, uintmax_t and uintptr_t. + # We require FILE, pid_t, size_t, ssize_t, time_t, uintmax_t + # and uintptr_t. AC_SUBST(FILE_t_decl) AC_CHECK_TYPE(FILE *,, AC_MSG_ERROR([No FILE type.]), $std_includes) - AC_SUBST(off_t_decl) - AC_CHECK_TYPE(off_t,, AC_MSG_ERROR([No off_t type.]), $std_includes) AC_SUBST(pid_t_decl) AC_CHECK_TYPE(pid_t,, AC_MSG_ERROR([No pid_t type.]), $std_includes) AC_SUBST(size_t_decl) @@ -126,6 +25,14 @@ AC_DEFUN([AM_TYPES], [ AC_SUBST(time_t_decl) AC_CHECK_TYPE(time_t,, AC_MSG_ERROR([No time_t type.]), $std_includes) + # We require off_t, but use a local version for portability to Windows + # where it's 4B, not 8B. + AC_SUBST(off_t_decl) + AC_CHECK_TYPE(off_t, + [off_t_decl="typedef off_t wt_off_t;"], + [AC_MSG_ERROR([No off_t type.])], + $std_includes) + # Some systems don't have a uintmax_t type (for example, FreeBSD 6.2. # In this case, use an unsigned long long. AC_SUBST(uintmax_t_decl) diff --git a/build_posix/configure.ac.in b/build_posix/configure.ac.in index 6352fa6d0df..feade27ae1b 100644 --- a/build_posix/configure.ac.in +++ b/build_posix/configure.ac.in @@ -7,7 +7,7 @@ m4_include([build_posix/aclocal/version-set.m4]) AC_CONFIG_AUX_DIR([build_posix/gnu-support]) AC_CONFIG_MACRO_DIR([build_posix/aclocal]) -AC_CONFIG_SRCDIR([RELEASE]) +AC_CONFIG_SRCDIR([RELEASE_INFO]) # If CFLAGS/CXXFLAGS were not set on entry, default to "-O3 -g" : ${CFLAGS=-O3 -g} |