1curl_getenv(3) libcurl Manual curl_getenv(3)
2
3
4
6 curl_getenv - return value for environment name
7
9 #include <curl/curl.h>
10
11 char *curl_getenv(const char *name);
12
14 curl_getenv() is a portable wrapper for the getenv() function, meant to
15 emulate its behavior and provide an identical interface for all operat‐
16 ing systems libcurl builds on (including win32).
17
18 You must curl_free(3) the returned string when you're done with it.
19
21 This function will be removed from the public libcurl API in a near fu‐
22 ture. It will instead be made "available" by source code access only,
23 and then as curlx_getenv().
24
26 A pointer to a null-terminated string or NULL if it failed to find the
27 specified name.
28
30 Under unix operating systems, there isn't any point in returning an al‐
31 located memory, although other systems won't work properly if this
32 isn't done. The unix implementation thus has to suffer slightly from
33 the drawbacks of other systems.
34
36 getenv(3C),
37
38
39
40libcurl 7.79.1 December 31, 2020 curl_getenv(3)