1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* missing/strcasecmp.c: removed. Ruby don't use locale dependent

strcasecmp.

* missing/strncasecmp.c: ditto.

* configure.in: don't check strcasecmp and strncasecmp.

* LEGAL: missing/strcasecmp.c and missing/strncasecmp.c removed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14847 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2008-01-02 02:36:58 +00:00
parent 8676df80ed
commit 7e2fdd4cc8
5 changed files with 12 additions and 37 deletions

View file

@ -1,3 +1,14 @@
Wed Jan 2 11:34:57 2008 Tanaka Akira <akr@fsij.org>
* missing/strcasecmp.c: removed. Ruby don't use locale dependent
strcasecmp.
* missing/strncasecmp.c: ditto.
* configure.in: don't check strcasecmp and strncasecmp.
* LEGAL: missing/strcasecmp.c and missing/strncasecmp.c removed.
Wed Jan 2 10:13:54 2008 Tadayoshi Funaba <tadf@dotrb.org> Wed Jan 2 10:13:54 2008 Tadayoshi Funaba <tadf@dotrb.org>
* sample/time.rb: use Process.times instead of Time.times. * sample/time.rb: use Process.times instead of Time.times.

2
LEGAL
View file

@ -148,11 +148,9 @@ missing/isinf.c:
missing/isnan.c: missing/isnan.c:
missing/memcmp.c: missing/memcmp.c:
missing/memmove.c: missing/memmove.c:
missing/strcasecmp.c:
missing/strchr.c: missing/strchr.c:
missing/streror.c: missing/streror.c:
missing/strftime.c: missing/strftime.c:
missing/strncasecmp.c:
missing/strstr.c: missing/strstr.c:
missing/strtol.c: missing/strtol.c:
ext/digest/sha1/sha1.[ch]: ext/digest/sha1/sha1.[ch]:

View file

@ -632,7 +632,7 @@ powerpc-darwin*)
;; ;;
esac esac
AC_FUNC_MEMCMP AC_FUNC_MEMCMP
AC_REPLACE_FUNCS(dup2 memmove strcasecmp strncasecmp strerror strftime\ AC_REPLACE_FUNCS(dup2 memmove strerror strftime\
strchr strstr strtoul crypt flock vsnprintf\ strchr strstr strtoul crypt flock vsnprintf\
isnan finite isinf hypot acosh erf strlcpy strlcat) isnan finite isinf hypot acosh erf strlcpy strlcat)
AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd eaccess\ AC_CHECK_FUNCS(fmod killpg wait4 waitpid fork spawnv syscall chroot fsync getcwd eaccess\

View file

@ -1,15 +0,0 @@
/* public domain rewrite of strcasecmp(3) */
#include <ctype.h>
int
strcasecmp(const char *p1, const char *p2)
{
while (*p1 && *p2) {
if (toupper(*p1) != toupper(*p2))
return toupper(*p1) - toupper(*p2);
p1++;
p2++;
}
return strlen(p1) - strlen(p2);
}

View file

@ -1,19 +0,0 @@
/* public domain rewrite of strncasecmp(3) */
#include <ctype.h>
#include <stddef.h>
int
strncasecmp(const char *p1, const char *p2, size_t len)
{
while (len != 0) {
if (toupper(*p1) != toupper(*p2)) {
return toupper(*p1) - toupper(*p2);
}
if (*p1 == '\0') {
return 0;
}
len--; p1++; p2++;
}
return 0;
}