]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: stdbuf.c: avoid the OS X putenv function
authorJim Meyering <meyering@fb.com>
Sun, 28 Jun 2015 17:35:04 +0000 (10:35 -0700)
committerJim Meyering <meyering@fb.com>
Mon, 29 Jun 2015 21:18:59 +0000 (14:18 -0700)
* 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

bootstrap.conf
src/stdbuf.c

index 5b6ec58e5047b4b00582805c0e4e9ee97450387a..67837b3f97663b0e5c21862da02d6b60147e6266 100644 (file)
@@ -210,6 +210,7 @@ gnulib_modules="
   savedir
   savewd
   selinux-at
+  setenv
   settime
   sig2str
   sigaction
index fe4d773a76924ccacbaaac1119d713c13c026c40..116619d7a913f9f6917d3570f29a4b97db23e5d1 100644 (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)