diff options
author | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 12:13:19 +0000 |
---|---|---|
committer | glass <glass@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-16 12:13:19 +0000 |
commit | a0d9bd444530984a0a10fe6ca73cf9467ba843d2 (patch) | |
tree | 9d42f86c5a4f0350e0f3d391d35f9e7ea970f212 /include | |
parent | 6be7c95734cd0fea632bf33039c9fa3c0e0ebecc (diff) | |
download | ruby-a0d9bd444530984a0a10fe6ca73cf9467ba843d2.tar.gz |
* configure.in: check strcasecmp().
* include/ruby/ruby.h: use strcasecmp() as st_strcasecmp() if it
exists.
* st.c (st_strcasecmp): define the function only if strcasecmp()
doesn't exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42008 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 2fd5981a67..df89b387dd 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1808,7 +1808,11 @@ int rb_toupper(int c); #define TOUPPER(c) rb_toupper((unsigned char)(c)) #define TOLOWER(c) rb_tolower((unsigned char)(c)) +#ifdef HAVE_STRCASECMP +#define st_strcasecmp strcasecmp +#else int st_strcasecmp(const char *s1, const char *s2); +#endif int st_strncasecmp(const char *s1, const char *s2, size_t n); #define STRCASECMP(s1, s2) (st_strcasecmp((s1), (s2))) #define STRNCASECMP(s1, s2, n) (st_strncasecmp((s1), (s2), (n))) |