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
26 BOOST_NOWIDE_DECL char* getenv(const char* key);
27
31 BOOST_NOWIDE_DECL int system(const char* cmd);
32
33#endif
43 BOOST_NOWIDE_DECL int setenv(const char* key, const char* value, int overwrite);
44
51 BOOST_NOWIDE_DECL int unsetenv(const char* key);
52
61 BOOST_NOWIDE_DECL int putenv(char* string);
62
63} // namespace nowide
64} // namespace boost
65
66#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:28
int putenv(char *string)
Adds or changes an environment variable, string must be in format KEY=VALUE.
Definition: cstdlib.cpp:38
int unsetenv(const char *key)
Remove environment variable key.
Definition: cstdlib.cpp:33