* 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
This commit is contained in:
parent
6be7c95734
commit
a0d9bd4445
10
ChangeLog
10
ChangeLog
@ -1,3 +1,13 @@
|
|||||||
|
Tue Jul 16 21:07:04 2013 Masaki Matsushita <glass.saga@gmail.com>
|
||||||
|
|
||||||
|
* 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.
|
||||||
|
|
||||||
Tue Jul 16 20:21:28 2013 Tanaka Akira <akr@fsij.org>
|
Tue Jul 16 20:21:28 2013 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* bignum.c (bigsq): Renamed from bigsqr.
|
* bignum.c (bigsq): Renamed from bigsqr.
|
||||||
|
@ -1823,6 +1823,7 @@ AC_CHECK_FUNCS(sigaltstack)
|
|||||||
AC_CHECK_FUNCS(sigprocmask)
|
AC_CHECK_FUNCS(sigprocmask)
|
||||||
AC_CHECK_FUNCS(sinh)
|
AC_CHECK_FUNCS(sinh)
|
||||||
AC_CHECK_FUNCS(spawnv)
|
AC_CHECK_FUNCS(spawnv)
|
||||||
|
AC_CHECK_FUNCS(strcasecmp)
|
||||||
AC_CHECK_FUNCS(symlink)
|
AC_CHECK_FUNCS(symlink)
|
||||||
AC_CHECK_FUNCS(syscall)
|
AC_CHECK_FUNCS(syscall)
|
||||||
AC_CHECK_FUNCS(sysconf)
|
AC_CHECK_FUNCS(sysconf)
|
||||||
|
@ -1808,7 +1808,11 @@ int rb_toupper(int c);
|
|||||||
#define TOUPPER(c) rb_toupper((unsigned char)(c))
|
#define TOUPPER(c) rb_toupper((unsigned char)(c))
|
||||||
#define TOLOWER(c) rb_tolower((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);
|
int st_strcasecmp(const char *s1, const char *s2);
|
||||||
|
#endif
|
||||||
int st_strncasecmp(const char *s1, const char *s2, size_t n);
|
int st_strncasecmp(const char *s1, const char *s2, size_t n);
|
||||||
#define STRCASECMP(s1, s2) (st_strcasecmp((s1), (s2)))
|
#define STRCASECMP(s1, s2) (st_strcasecmp((s1), (s2)))
|
||||||
#define STRNCASECMP(s1, s2, n) (st_strncasecmp((s1), (s2), (n)))
|
#define STRNCASECMP(s1, s2, n) (st_strncasecmp((s1), (s2), (n)))
|
||||||
|
2
st.c
2
st.c
@ -1524,6 +1524,7 @@ strhash(st_data_t arg)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_STRCASECMP
|
||||||
int
|
int
|
||||||
st_strcasecmp(const char *s1, const char *s2)
|
st_strcasecmp(const char *s1, const char *s2)
|
||||||
{
|
{
|
||||||
@ -1547,6 +1548,7 @@ st_strcasecmp(const char *s1, const char *s2)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int
|
int
|
||||||
st_strncasecmp(const char *s1, const char *s2, size_t n)
|
st_strncasecmp(const char *s1, const char *s2, size_t n)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user