putenv is more platform independent
This commit is contained in:
parent
0ebe06822d
commit
35fb9fe291
1 changed files with 9 additions and 2 deletions
|
@ -19,7 +19,7 @@
|
||||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||||
// DEALINGS IN THE SOFTWARE.
|
// DEALINGS IN THE SOFTWARE.
|
||||||
|
|
||||||
// $Id: FbCommands.cc,v 1.28 2004/10/06 11:40:28 akir Exp $
|
// $Id: FbCommands.cc,v 1.29 2004/10/21 10:24:34 akir Exp $
|
||||||
|
|
||||||
#include "FbCommands.hh"
|
#include "FbCommands.hh"
|
||||||
#include "fluxbox.hh"
|
#include "fluxbox.hh"
|
||||||
|
@ -38,6 +38,13 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#ifdef HAVE_CSTDLIB
|
||||||
|
#include <cstdlib>
|
||||||
|
#else
|
||||||
|
#include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif // HAVE_CONFIG_H
|
#endif // HAVE_CONFIG_H
|
||||||
|
@ -128,7 +135,7 @@ ExportCmd::ExportCmd(const std::string& name, const std::string& value) :
|
||||||
}
|
}
|
||||||
|
|
||||||
void ExportCmd::execute() {
|
void ExportCmd::execute() {
|
||||||
setenv(m_name.c_str(), m_value.c_str(), 1);
|
putenv((m_name + "=" + m_value).c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue