From 35fb9fe2919571a7a4868e8012d3a52dbb871a55 Mon Sep 17 00:00:00 2001 From: akir Date: Thu, 21 Oct 2004 10:24:34 +0000 Subject: putenv is more platform independent --- src/FbCommands.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/FbCommands.cc b/src/FbCommands.cc index b57534c..e4ea86d 100644 --- a/src/FbCommands.cc +++ b/src/FbCommands.cc @@ -19,7 +19,7 @@ // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER // 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 "fluxbox.hh" @@ -38,6 +38,13 @@ #include #include +#ifdef HAVE_CSTDLIB + #include +#else + #include +#endif + + #ifdef HAVE_CONFIG_H #include "config.h" #endif // HAVE_CONFIG_H @@ -128,7 +135,7 @@ ExportCmd::ExportCmd(const std::string& name, const std::string& value) : } void ExportCmd::execute() { - setenv(m_name.c_str(), m_value.c_str(), 1); + putenv((m_name + "=" + m_value).c_str()); } -- cgit v0.11.2