Patchwork libgo patch committed: Inherit environment in http/cgi

login
register
mail settings
Submitter Rainer Orth
Date April 29, 2011, 10:29 a.m.
Message ID <yddei4l73l6.fsf@manam.CeBiTec.Uni-Bielefeld.DE>
Download mbox | patch
Permalink /patch/93412/
State New
Headers show

Comments

Rainer Orth - April 29, 2011, 10:29 a.m.
Ian,

> This libgo patch brings over a patch to the master Go library to inherit
> environment variables in http/cgi.  This should fix PR go/48503.

not really :-)  It needs the following supplement to handle Solaris and
IRIX.  I'm not only including LD_LIBRARY_PATH (although this would suffice
for the testcase to pass), but also the ABI variants thereof.

Bootstrapped without regressions on i386-pc-solaris2.11 and
sparc-sun-solaris2.11.  Not yet tested on mips-sgi-irix6.5, but seems
pretty obvious.

	Rainer


2011-04-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR go/48503
	* go/http/cgi/host.go (osDefaultInheritEnv): Pass LD_LIBRARY_PATH
	and ABI variants on irix and solaris.
Ian Taylor - April 29, 2011, 5:54 p.m.
Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> writes:

>> This libgo patch brings over a patch to the master Go library to inherit
>> environment variables in http/cgi.  This should fix PR go/48503.
>
> not really :-)  It needs the following supplement to handle Solaris and
> IRIX.  I'm not only including LD_LIBRARY_PATH (although this would suffice
> for the testcase to pass), but also the ABI variants thereof.

Thanks.  Committed.

Ian

Patch

diff --git a/libgo/go/http/cgi/host.go b/libgo/go/http/cgi/host.go
--- a/libgo/go/http/cgi/host.go
+++ b/libgo/go/http/cgi/host.go
@@ -36,7 +36,9 @@  var osDefaultInheritEnv = map[string][]s
 	"darwin":  []string{"DYLD_LIBRARY_PATH"},
 	"freebsd": []string{"LD_LIBRARY_PATH"},
 	"hpux":    []string{"LD_LIBRARY_PATH", "SHLIB_PATH"},
+	"irix":    []string{"LD_LIBRARY_PATH", "LD_LIBRARYN32_PATH", "LD_LIBRARY64_PATH"},
 	"linux":   []string{"LD_LIBRARY_PATH"},
+	"solaris": []string{"LD_LIBRARY_PATH", "LD_LIBRARY_PATH_32", "LD_LIBRARY_PATH_64"},
 	"windows": []string{"SystemRoot", "COMSPEC", "PATHEXT", "WINDIR"},
 }