summaryrefslogtreecommitdiff
path: root/src/drivers/Posix
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2020-02-10 11:55:34 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2020-02-10 12:10:40 +0100
commit4c1b92eb52db567b4c1618222bb3007a2a2e7d9b (patch)
tree58081f8e02a8d43dc273de033d454c16e9946f28 /src/drivers/Posix
parentdcb848ca3ed0ebddd4f28888d2a8ab2f59c9fd1c (diff)
Implement fl_putenv() as cross-platform putenv()
Diffstat (limited to 'src/drivers/Posix')
-rw-r--r--src/drivers/Posix/Fl_Posix_System_Driver.H12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/drivers/Posix/Fl_Posix_System_Driver.H b/src/drivers/Posix/Fl_Posix_System_Driver.H
index e4d6eba1e..407fa0270 100644
--- a/src/drivers/Posix/Fl_Posix_System_Driver.H
+++ b/src/drivers/Posix/Fl_Posix_System_Driver.H
@@ -1,20 +1,20 @@
//
// "$Id$"
//
-// Definition of Posix system driver
+// Definition of POSIX system driver
// for the Fast Light Tool Kit (FLTK).
//
-// Copyright 2010-2017 by Bill Spitzak and others.
+// Copyright 2010-2020 by Bill Spitzak and others.
//
// This library is free software. Distribution and use rights are outlined in
// the file "COPYING" which should have been included with this file. If this
// file is missing or damaged, see the license at:
//
-// http://www.fltk.org/COPYING.php
+// https://www.fltk.org/COPYING.php
//
// Please report all bugs and problems on the following page:
//
-// http://www.fltk.org/str.php
+// https://www.fltk.org/str.php
//
/**
@@ -52,8 +52,8 @@ public:
virtual int open(const char* f, int oflags, int pmode) {
return pmode == -1 ? ::open(f, oflags) : ::open(f, oflags, pmode);
}
- virtual char *getenv(const char *v) { return ::getenv(v); }
- virtual int putenv(char* v) {return ::putenv(v);}
+ virtual char *getenv(const char *v) { return ::getenv(v); }
+ virtual int putenv(const char *var) {return ::putenv(strdup(var));}
virtual int system(const char* cmd) {return ::system(cmd);}
virtual int execvp(const char *file, char *const *argv) {return ::execvp(file, argv);}
virtual int chmod(const char* f, int mode) {return ::chmod(f, mode);}