diff options
author | Alex Gorrod <alexg@wiredtiger.com> | 2012-12-03 18:37:06 +1100 |
---|---|---|
committer | Alex Gorrod <alexg@wiredtiger.com> | 2012-12-03 18:37:06 +1100 |
commit | 450b43cd032601b7207629de334e674dfdd62203 (patch) | |
tree | 72d063515f06416f780fce717d4fc004f3335943 | |
parent | 999b87b9d64ff610ec57ebe61088765dd1f8af31 (diff) | |
download | mongo-450b43cd032601b7207629de334e674dfdd62203.tar.gz |
Rename our strtouq to __wt_strtouq so we don't export anything outside
of our namespace.
-rw-r--r-- | src/cursor/cur_dump.c | 2 | ||||
-rw-r--r-- | src/include/extern.h | 1 | ||||
-rw-r--r-- | src/os_posix/os_strtouq.c | 8 | ||||
-rw-r--r-- | src/utilities/util_misc.c | 2 |
4 files changed, 8 insertions, 5 deletions
diff --git a/src/cursor/cur_dump.c b/src/cursor/cur_dump.c index 084175fa51f..dc86d2581c5 100644 --- a/src/cursor/cur_dump.c +++ b/src/cursor/cur_dump.c @@ -104,7 +104,7 @@ str2recno(WT_SESSION_IMPL *session, const char *p, uint64_t *recnop) goto format; errno = 0; - recno = strtouq(p, &endptr, 0); + recno = __wt_strtouq(p, &endptr, 0); if (recno == ULLONG_MAX && errno == ERANGE) WT_RET_MSG(session, ERANGE, "%s: invalid record number", p); if (endptr[0] != '\0') diff --git a/src/include/extern.h b/src/include/extern.h index 150764ee184..20e7b84e801 100644 --- a/src/include/extern.h +++ b/src/include/extern.h @@ -934,6 +934,7 @@ extern int __wt_write(WT_SESSION_IMPL *session, uint32_t bytes, const void *buf); extern void __wt_sleep(long seconds, long micro_seconds); +extern uint64_t __wt_strtouq(const char *nptr, char **endptr, int base); extern int __wt_thread_create(pthread_t *tidret, void *(*func)(void *), void *arg); diff --git a/src/os_posix/os_strtouq.c b/src/os_posix/os_strtouq.c index afc2ae4fc32..0a688ff16d3 100644 --- a/src/os_posix/os_strtouq.c +++ b/src/os_posix/os_strtouq.c @@ -7,15 +7,17 @@ #include "wt_internal.h" -#if !defined(HAVE_STRTOUQ) /* * Convert a string to an unsigned quad integer. */ uint64_t -strtouq(const char *nptr, char **endptr, int base) +__wt_strtouq(const char *nptr, char **endptr, int base) { +#if defined(HAVE_STRTOUQ) + return (__wt_strtouq(nptr, endptr, base)); +#else STATIC_ASSERT(sizeof(uint64_t) == sizeof(unsigned long long)); return (strtoull(nptr, endptr, base)); -} #endif +} diff --git a/src/utilities/util_misc.c b/src/utilities/util_misc.c index bd1df294bbe..1033520d628 100644 --- a/src/utilities/util_misc.c +++ b/src/utilities/util_misc.c @@ -108,7 +108,7 @@ util_str2recno(const char *p, uint64_t *recnop) goto format; errno = 0; - recno = strtouq(p, &endptr, 0); + recno = __wt_strtouq(p, &endptr, 0); if (recno == ULLONG_MAX && errno == ERANGE) return (util_err(ERANGE, "%s: invalid record number", p)); |