summaryrefslogtreecommitdiff
path: root/src/third_party/wiredtiger/src/os_common/os_strtouq.c
blob: 0ae604fc7610b8d44df6fed5fcdff3253f423484 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/*-
 * Copyright (c) 2014-2016 MongoDB, Inc.
 * Copyright (c) 2008-2014 WiredTiger, Inc.
 *	All rights reserved.
 *
 * See the file LICENSE for redistribution information.
 */

#include "wt_internal.h"

/*
 * __wt_strtouq --
 *	Convert a string to an unsigned quad integer.
 */
uint64_t
__wt_strtouq(const char *nptr, char **endptr, int base)
{
#if defined(HAVE_STRTOUQ)
	return (strtouq(nptr, endptr, base));
#else
	WT_STATIC_ASSERT(sizeof(uint64_t) == sizeof(unsigned long long));

	return (strtoull(nptr, endptr, base));
#endif
}