diff options
author | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2012-12-26 05:11:10 +0100 |
---|---|---|
committer | Jérémie Courrèges-Anglas <jca@wxcvbn.org> | 2012-12-26 05:13:06 +0100 |
commit | a88b2a86adc03916a0859468edf742dbf5140b01 (patch) | |
tree | bced9a581fb1c53c1061fbef1cbacabd1ccffbfd /configure.in | |
parent | 9d1edbd9c618b063a4baae39a82a81da236ea72f (diff) | |
download | ratpoison-a88b2a86adc03916a0859468edf742dbf5140b01.zip |
environment handling fixes
* AC_CHECK_FUNCS: +setenv +unsetenv -putenv
(the check for putenv() wasn't used anyway)
* prefer setenv() to putenv() in cmd_setenv()
* prefer unsetenv() to putenv() in cmd_unsetenv()
- putenv("FOO") isn't legit everywhere
- putenv("FOO=") will only work on MinGW
* make the getenv command return an empty output if the variable wasn't found
* while here, split and sort AC_CHECK_FUNCS
|cos| on #ratpoison reported that environment variables weren't
properly removed, and proposed a different fix. thanks!
Diffstat (limited to 'configure.in')
-rw-r--r-- | configure.in | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/configure.in b/configure.in index 08f4ee8..b60e103 100644 --- a/configure.in +++ b/configure.in @@ -146,7 +146,8 @@ AC_CHECK_HEADERS(unistd.h stdarg.h) dnl Checks for typedefs, structures, and compiler characteristics. dnl Checks for library functions. -AC_CHECK_FUNCS(getopt getopt_long setsid setpgid setpgrp putenv vsnprintf usleep getline) +AC_CHECK_FUNCS(getline getopt getopt_long setenv setpgid setpgrp setsid) +AC_CHECK_FUNCS(unsetenv usleep vsnprintf) AC_TYPE_SIGNAL |