1 /*****************************************************************************
3 * Project ___| | | | _ \| |
5 * | (__| |_| | _ <| |___
6 * \___|\___/|_| \_\_____|
8 * Copyright (C) 2000, Daniel Stenberg, <daniel@haxx.se>, et al.
10 * In order to be useful for every potential user, curl and libcurl are
11 * dual-licensed under the MPL and the MIT/X-derivate licenses.
13 * You may opt to use, copy, modify, merge, publish, distribute and/or sell
14 * copies of the Software, and permit persons to whom the Software is
15 * furnished to do so, under the terms of the MPL or the MIT/X-derivate
16 * licenses. You may pick one of these licenses.
18 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
19 * KIND, either express or implied.
22 *****************************************************************************/
37 char *GetEnv(char *variable)
40 /* This shit requires windows.h (HUGE) to be included */
41 char env[MAX_PATH]; /* MAX_PATH is from windef.h */
42 char *temp = getenv(variable);
45 ExpandEnvironmentStrings(temp, env, sizeof(env));
47 /* no length control */
48 char *env = getenv(variable);
50 return (env && env[0])?strdup(env):NULL;
53 char *curl_getenv(char *v)