aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKazuki Yamaguchi <k@rhe.jp>2017-04-14 14:04:57 +0900
committerKazuki Yamaguchi <k@rhe.jp>2017-09-09 16:32:30 +0900
commitcd56d10de6e78996197df820e1b60846cd078681 (patch)
tree7ac411ba0260e332448e2efbeac7fd1080d66aa1
parent7c2aecc1d33d45742de835317f7ff0a16b31b01f (diff)
downloadruby-cd56d10de6e78996197df820e1b60846cd078681.tar.gz
configure.in: don't check for broken memcmp()
Systems with a broken memcmp() are sufficiently old not to build Ruby successfully.
-rw-r--r--LEGAL1
-rw-r--r--common.mk1
-rw-r--r--configure.in2
-rw-r--r--missing/memcmp.c18
-rw-r--r--win32/Makefile.sub1
5 files changed, 0 insertions, 23 deletions
diff --git a/LEGAL b/LEGAL
index 85142ce27a..0426fec8b2 100644
--- a/LEGAL
+++ b/LEGAL
@@ -385,7 +385,6 @@ missing/hypot.c:
missing/isinf.c:
missing/isnan.c:
missing/lgamma_r.c:
-missing/memcmp.c:
missing/tgamma.c:
ext/date/date_strftime.c:
ext/digest/sha1/sha1.[ch]:
diff --git a/common.mk b/common.mk
index e78f1b052f..93779a8851 100644
--- a/common.mk
+++ b/common.mk
@@ -804,7 +804,6 @@ erf.$(OBJEXT): {$(VPATH)}erf.c
explicit_bzero.$(OBJEXT): {$(VPATH)}explicit_bzero.c
finite.$(OBJEXT): {$(VPATH)}finite.c
flock.$(OBJEXT): {$(VPATH)}flock.c
-memcmp.$(OBJEXT): {$(VPATH)}memcmp.c
mkdir.$(OBJEXT): {$(VPATH)}mkdir.c
setproctitle.$(OBJEXT): {$(VPATH)}setproctitle.c
strlcat.$(OBJEXT): {$(VPATH)}strlcat.c
diff --git a/configure.in b/configure.in
index 7a46e5eb63..f2d29b297b 100644
--- a/configure.in
+++ b/configure.in
@@ -1312,7 +1312,6 @@ main()
ac_cv_func_symlink=yes
ac_cv_lib_crypt_crypt=no
ac_cv_func_getpgrp_void=no
- ac_cv_func_memcmp_working=yes
ac_cv_lib_dl_dlopen=no
rb_cv_binary_elf=no
rb_cv_negative_time_t=no
@@ -2216,7 +2215,6 @@ AS_IF([test "x$ALLOCA" = "x"], [
],)
])
])
-AC_FUNC_MEMCMP
# http://sources.redhat.com/ml/libc-hacker/2005-08/msg00008.html
# Debian GNU/Linux Etch's libc6.1 2.3.6.ds1-13etch5 has this problem.
diff --git a/missing/memcmp.c b/missing/memcmp.c
deleted file mode 100644
index a81eec4244..0000000000
--- a/missing/memcmp.c
+++ /dev/null
@@ -1,18 +0,0 @@
-/* public domain rewrite of memcmp(3) */
-
-#include "ruby/missing.h"
-#include <stddef.h>
-
-int
-memcmp(const void *s1, const void *s2, size_t len)
-{
- register unsigned char *a = (unsigned char*)s1;
- register unsigned char *b = (unsigned char*)s2;
- register int tmp;
-
- for (; len; --len) {
- if (tmp = *a++ - *b++)
- return tmp;
- }
- return 0;
-}
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 38fe19c1fb..15b9f2c4e4 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -712,7 +712,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub
!endif
#define HAVE_ALLOCA 1
#define HAVE_DUP2 1
-#define HAVE_MEMCMP 1
#define HAVE_MKDIR 1
#define HAVE_CLOCK_GETTIME 1
#define HAVE_CLOCK_GETRES 1