diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-01 13:27:47 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-02-01 13:27:47 +0000 |
commit | 88f3b6efb4105b17998a22befdfd42244314935e (patch) | |
tree | a4b102d011c81fbcc9ac518c607121747a6b469c /hash.c | |
parent | 598451429c20db4bbb2249f59d9641ad22126269 (diff) | |
download | ruby-88f3b6efb4105b17998a22befdfd42244314935e.tar.gz |
* configure.in, hash.c (ruby_setenv): use setenv(3) and unsetenv(3)
where they are supported. modifing environ variable seems to
segfault solaris 10. [ruby-core:7276] [ruby-dev:28270]
* ruby.c (set_arg0): if use setenv(3), environ space cannot be used
for altering argv[0].
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r-- | hash.c | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -196,8 +196,6 @@ rb_hash_foreach(VALUE hash, int (*func)(ANYARGS), VALUE farg) rb_ensure(hash_foreach_call, (VALUE)&arg, hash_foreach_ensure, hash); } -static VALUE hash_alloc(VALUE); - static VALUE hash_alloc(VALUE klass) { @@ -1690,7 +1688,7 @@ ruby_setenv(const char *name, const char *value) * RTL's environ global variable directly yet. */ SetEnvironmentVariable(name,value); -#elif defined __CYGWIN__ +#elif defined(HAVE_SETENV) && defined(HAVE_UNSETENV) #undef setenv #undef unsetenv if (value) |