In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/235c1d5fb08d2f9bf82de88220390de5210ac392?hp=ecd78e215c9b4ab3f3ab71b30e76bbead372a84e>

- Log -----------------------------------------------------------------
commit 235c1d5fb08d2f9bf82de88220390de5210ac392
Author: Andy Dougherty <[email protected]>
Date:   Fri Jul 25 13:55:32 2014 -0400

    Only use setenv() on Solaris if it is available.
    
    This is a followup to 07ad9e0e19891ec129e1a78e40a66ca19b51302d.
    util.c:Perl_my_setenv() unconditionally used setenv() if #defined(__sun).
    Solaris 8 had neither setenv() nor unsetenv(), so it failed.  Configure
    does not currently check for setenv(), but the check for unsetenv()
    is sufficient here since Solaris 9 and later have both.
-----------------------------------------------------------------------

Summary of changes:
 util.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/util.c b/util.c
index 1f9a5b3..98b121f 100644
--- a/util.c
+++ b/util.c
@@ -2072,7 +2072,11 @@ Perl_my_setenv(pTHX_ const char *nam, const char *val)
         my_setenv_format(environ[i], nam, nlen, val, vlen);
     } else {
 # endif
-#   if defined(__CYGWIN__)|| defined(__SYMBIAN32__) || defined(__riscos__) || 
defined(__sun)
+    /* This next branch should only be called #if defined(HAS_SETENV), but
+       Configure doesn't test for that yet.  For Solaris, setenv() and 
unsetenv()
+       were introduced in Solaris 9, so testing for HAS UNSETENV is sufficient.
+    */
+#   if defined(__CYGWIN__)|| defined(__SYMBIAN32__) || defined(__riscos__) || 
(defined(__sun) && defined(HAS_UNSETENV))
 #       if defined(HAS_UNSETENV)
         if (val == NULL) {
             (void)unsetenv(nam);

--
Perl5 Master Repository

Reply via email to