From 2a9719235d9cc7b0ac402c6b2a33e07a481fe2ff Mon Sep 17 00:00:00 2001 From: usa Date: Tue, 25 Nov 2003 12:44:26 +0000 Subject: [PATCH] * defines.h (ENV_IGNORECASE): should define when DOSISH without human68k. * hash.c (env_has_value, env_index): don't ignore case of value. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5029 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 7 +++++++ defines.h | 2 +- hash.c | 8 -------- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9db2789209..ffbd282a80 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Tue Nov 25 21:41:35 2003 NAKAMURA Usaku + + * defines.h (ENV_IGNORECASE): should define when DOSISH without + human68k. + + * hash.c (env_has_value, env_index): don't ignore case of value. + Tue Nov 25 20:02:14 2003 Minero Aoki * test/fileutils/test_fileutils.rb: do test in more deep diff --git a/defines.h b/defines.h index 0e2c9b36aa..ca7cd8e1e1 100644 --- a/defines.h +++ b/defines.h @@ -180,7 +180,7 @@ flush_register_windows(void) #define PATH_ENV "PATH" #endif -#if defined(DOSISH) || !defined(__human68k__) +#if defined(DOSISH) && !defined(__human68k__) #define ENV_IGNORECASE #endif diff --git a/hash.c b/hash.c index 75c07797d3..5fe1dbc6ae 100644 --- a/hash.c +++ b/hash.c @@ -1598,11 +1598,7 @@ env_has_value(dmy, value) while (*env) { char *s = strchr(*env, '='); if (s++) { -#ifdef ENV_IGNORECASE - if (strncasecmp(s, RSTRING(value)->ptr, strlen(s)) == 0) { -#else if (strncmp(s, RSTRING(value)->ptr, strlen(s)) == 0) { -#endif FREE_ENVIRON(environ); return Qtrue; } @@ -1625,11 +1621,7 @@ env_index(dmy, value) while (*env) { char *s = strchr(*env, '='); if (s++) { -#ifdef ENV_IGNORECASE - if (strncasecmp(s, RSTRING(value)->ptr, strlen(s)) == 0) { -#else if (strncmp(s, RSTRING(value)->ptr, strlen(s)) == 0) { -#endif str = env_str_new(*env, s-*env-1); FREE_ENVIRON(environ); return str;