all repos — fluxbox @ 35fb9fe2919571a7a4868e8012d3a52dbb871a55

custom fork of the fluxbox windowmanager

putenv is more platform independent
akir akir
commit

35fb9fe2919571a7a4868e8012d3a52dbb871a55

parent

0ebe06822d02fee61009a1da905ff3a61b6466a2

1 files changed, 9 insertions(+), 2 deletions(-)

jump to
M src/FbCommands.ccsrc/FbCommands.cc

@@ -19,7 +19,7 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING

// 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"

@@ -37,6 +37,13 @@ #include <unistd.h>

#include <fstream> #include <iostream> + +#ifdef HAVE_CSTDLIB + #include <cstdlib> +#else + #include <stdlib.h> +#endif + #ifdef HAVE_CONFIG_H #include "config.h"

@@ -128,7 +135,7 @@ m_name(name), m_value(value) {

} void ExportCmd::execute() { - setenv(m_name.c_str(), m_value.c_str(), 1); + putenv((m_name + "=" + m_value).c_str()); }