summaryrefslogtreecommitdiff
path: root/hash.c
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-19 04:21:25 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-06-19 04:21:25 +0000
commit7bb51e6ce911f70d7f850f1495f93ef987a1603d (patch)
tree2211e3cf867a437c159126e25f5677519a4e1fb5 /hash.c
parentd8b02b509608c5b90056c7befa89fa29fda45f8f (diff)
* hash.c (env_delete, rb_f_getenv, env_fetch): case insensitive to
access environment variables on DOSISH platforms. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'hash.c')
-rw-r--r--hash.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/hash.c b/hash.c
index 03318c3..30ad845 100644
--- a/hash.c
+++ b/hash.c
@@ -1017,8 +1017,8 @@ env_delete(obj, name)
VALUE value = env_str_new2(val);
ruby_setenv(nam, 0);
-#ifdef __BORLANDC__
- if (strcmpi(nam, "PATH") == 0) {
+#ifdef DOSISH
+ if (strcasecmp(nam, "PATH") == 0) {
#else
if (strcmp(nam, "PATH") == 0) {
#endif
@@ -1053,8 +1053,8 @@ rb_f_getenv(obj, name)
}
env = getenv(nam);
if (env) {
-#ifdef __BORLANDC__
- if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted())
+#ifdef DOSISH
+ if (strcasecmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#endif
@@ -1096,8 +1096,8 @@ env_fetch(argc, argv)
}
return if_none;
}
-#ifdef __BORLANDC__
- if (strcmpi(nam, "PATH") == 0 && !rb_env_path_tainted())
+#ifdef DOSISH
+ if (strcasecmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#else
if (strcmp(nam, "PATH") == 0 && !rb_env_path_tainted())
#endif