blob: 826e0da5f15a2f79562e07237462ae12dbe50838 (
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
26
27
|
/*-
* Copyright (c) 2014-2018 MongoDB, Inc.
* Copyright (c) 2008-2014 WiredTiger, Inc.
* All rights reserved.
*
* See the file LICENSE for redistribution information.
*/
#include "wt_internal.h"
/*
* __wt_getenv --
* Get a non-NULL, greater than zero-length environment variable.
*/
int
__wt_getenv(WT_SESSION_IMPL *session, const char *variable, const char **envp)
WT_GCC_FUNC_ATTRIBUTE((visibility("default")))
{
const char *temp;
*envp = NULL;
if (((temp = getenv(variable)) != NULL) && strlen(temp) > 0)
return (__wt_strdup(session, temp, envp));
return (0);
}
|