Boost.Nowide
cstdlib.hpp
1//
2// Copyright (c) 2012 Artyom Beilis (Tonkikh)
3//
4// Distributed under the Boost Software License, Version 1.0.
5// https://www.boost.org/LICENSE_1_0.txt
6
7#ifndef BOOST_NOWIDE_CSTDLIB_HPP_INCLUDED
8#define BOOST_NOWIDE_CSTDLIB_HPP_INCLUDED
9
11#if !defined(BOOST_WINDOWS)
12#include <cstdlib>
13#endif
14
15namespace boost {
16namespace nowide {
17#if !defined(BOOST_WINDOWS) && !defined(BOOST_NOWIDE_DOXYGEN)
18 using std::getenv;
19 using std::system;
20#else
31 BOOST_NOWIDE_DECL char* getenv(const char* key);
32
36 BOOST_NOWIDE_DECL int system(const char* cmd);
37
38#endif
48 BOOST_NOWIDE_DECL int setenv(const char* key, const char* value, int overwrite);
49
56 BOOST_NOWIDE_DECL int unsetenv(const char* key);
57
66 BOOST_NOWIDE_DECL int putenv(char* string);
67
68} // namespace nowide
69} // namespace boost
70
71#endif
int system(const char *cmd)
char * getenv(const char *key)
UTF-8 aware getenv. Returns 0 if the variable is not set.
int setenv(const char *key, const char *value, int overwrite)
Set environment variable key to value.
Definition cstdlib.cpp:30
int putenv(char *string)
Adds or changes an environment variable, string must be in format KEY=VALUE.
Definition cstdlib.cpp:40
int unsetenv(const char *key)
Remove environment variable key.
Definition cstdlib.cpp:35