15290783 SUNBT6333830 Perl should use setenv(3c) and unsetenv(3c) calls
authorVladimir Marek <Vladimir.Marek@oracle.com>
Wed, 28 May 2014 10:46:33 +0200
changeset 1926 d37b02d5beee
parent 1925 006fddcfd9b7
child 1927 7ffd58da1715
15290783 SUNBT6333830 Perl should use setenv(3c) and unsetenv(3c) calls
components/perl/perl516/patches/setenv.patch
components/perl512/patches/setenv.patch
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl/perl516/patches/setenv.patch	Wed May 28 10:46:33 2014 +0200
@@ -0,0 +1,15 @@
+This is in-house developed patch reported at
+https://rt.perl.org/Ticket/Display.html?id=121972
+
+Expectation is that future perl versions will contain the fix.
+--- perl-5.16.3/util.c	2014-05-28 10:46:26.254431769 +0200
++++ perl-5.16.3/util.c	2014-05-28 10:45:56.837881294 +0200
[email protected]@ -2092,7 +2092,7 @@ Perl_my_setenv(pTHX_ const char *nam, co
+        my_setenv_format(environ[i], nam, nlen, val, vlen);
+     } else {
+ # endif
+-#   if defined(__CYGWIN__) || defined(EPOC) || defined(__SYMBIAN32__) || defined(__riscos__)
++#   if defined(__CYGWIN__) || defined(EPOC) || defined(__SYMBIAN32__) || defined(__riscos__) || defined(__sun)
+ #       if defined(HAS_UNSETENV)
+         if (val == NULL) {
+             (void)unsetenv(nam);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/perl512/patches/setenv.patch	Wed May 28 10:46:33 2014 +0200
@@ -0,0 +1,15 @@
+This is in-house developed patch reported at
+https://rt.perl.org/Ticket/Display.html?id=121972
+
+Expectation is that future perl versions will contain the fix.
+--- perl-5.12.5/util.c	2014-05-28 12:10:02.250325812 +0200
++++ perl-5.12.5/util.c	2014-05-28 12:09:34.437338588 +0200
[email protected]@ -1712,7 +1712,7 @@ Perl_my_setenv(pTHX_ const char *nam, co
+        my_setenv_format(environ[i], nam, nlen, val, vlen);
+     } else {
+ # endif
+-#   if defined(__CYGWIN__) || defined(EPOC) || defined(__SYMBIAN32__) || defined(__riscos__)
++#   if defined(__CYGWIN__) || defined(EPOC) || defined(__SYMBIAN32__) || defined(__riscos__) || defined(__sun)
+ #       if defined(HAS_UNSETENV)
+         if (val == NULL) {
+             (void)unsetenv(nam);