From a0d9bd444530984a0a10fe6ca73cf9467ba843d2 Mon Sep 17 00:00:00 2001 From: glass Date: Tue, 16 Jul 2013 12:13:19 +0000 Subject: * 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 --- include/ruby/ruby.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'include') 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))) -- cgit v1.2.3