summaryrefslogtreecommitdiff
path: root/libs/pbd/epa.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-07-11 11:37:25 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-07-11 11:37:25 -0400
commit27eecdc88b8db2d89efcc1205dd437466d50f058 (patch)
treee0f96d99280967807d7d658217e55b1a5f4f84de /libs/pbd/epa.cc
parent23bec25bf525dfc1434fe8b95f6d81c9387ac9c5 (diff)
Use g_setenv and g_getenv for portability
Diffstat (limited to 'libs/pbd/epa.cc')
-rw-r--r--libs/pbd/epa.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/pbd/epa.cc b/libs/pbd/epa.cc
index 8b8a23491b..d8a3cd5a65 100644
--- a/libs/pbd/epa.cc
+++ b/libs/pbd/epa.cc
@@ -17,6 +17,8 @@
*/
+#include <glib.h>
+
#include <cstdlib>
#include "pbd/epa.h"
@@ -61,7 +63,7 @@ EnvironmentalProtectionAgency::save ()
/* fetch environment from named environment variable, rather than "environ"
*/
- const char* estr = getenv (_envname.c_str());
+ const char* estr = g_getenv (_envname.c_str());
if (!estr) {
return;
@@ -117,7 +119,7 @@ EnvironmentalProtectionAgency::restore () const
clear ();
for (map<string,string>::const_iterator i = e.begin(); i != e.end(); ++i) {
- setenv (i->first.c_str(), i->second.c_str(), 1);
+ g_setenv (i->first.c_str(), i->second.c_str(), 1);
}
}
@@ -137,6 +139,6 @@ EnvironmentalProtectionAgency::clear () const
}
string before = estring.substr (0, equal);
- unsetenv(before.c_str());
+ g_unsetenv(before.c_str());
}
}