maint: stdbuf.c: avoid the OS X putenv function

* bootstrap.conf (gnulib_modules): Add setenv, to make this
module dependency explicit; setenv is also used by split.
* src/stdbuf.c (set_LD_PRELOAD) [__APPLE__]: Use the OS X setenv
function, rather than putenv, per that documentation:
https://developer.apple.com/\
library/mac/documentation/Darwin/Reference/ManPages/man3/putenv.3.html
This commit is contained in:
Jim Meyering committed 2015-06-29 14:18:59 -07:00
1 parent 46416bb7c3
commit f303fb6bbb
2 files changed
+2 -1

No files matched your search

+1
View File
@@ -210,6 +210,7 @@ gnulib_modules="
savedir
savewd
selinux-at
setenv
settime
sig2str
sigaction
+1 -1
View File
@@ -256,7 +256,7 @@ set_LD_PRELOAD (void)
ret = putenv (LD_PRELOAD);
#ifdef __APPLE__
if (ret == 0)
ret = putenv ("DYLD_FORCE_FLAT_NAMESPACE=y");
ret = setenv ("DYLD_FORCE_FLAT_NAMESPACE", "y", 1);
#endif
if (ret != 0)