From 70c9bb4b81d06783121782cc54fde7ac80b72ba4 Mon Sep 17 00:00:00 2001 From: rhe Date: Fri, 21 Apr 2017 06:03:12 +0000 Subject: Remove missing/strtol.c It is never used. We don't need it anyway as it's part of C89 which is our current minimum requirement. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58430 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- LEGAL | 1 - common.mk | 2 -- include/ruby/missing.h | 6 ------ missing/strtol.c | 27 --------------------------- win32/Makefile.sub | 3 --- 5 files changed, 39 deletions(-) delete mode 100644 missing/strtol.c diff --git a/LEGAL b/LEGAL index 8080cfef61..85c50cb932 100644 --- a/LEGAL +++ b/LEGAL @@ -417,7 +417,6 @@ missing/memmove.c: missing/strchr.c: missing/strerror.c: missing/strstr.c: -missing/strtol.c: missing/tgamma.c: ext/date/date_strftime.c: ext/digest/sha1/sha1.[ch]: diff --git a/common.mk b/common.mk index f4545c2527..ff61f04f8d 100644 --- a/common.mk +++ b/common.mk @@ -804,8 +804,6 @@ strerror.$(OBJEXT): {$(VPATH)}strerror.c strlcat.$(OBJEXT): {$(VPATH)}strlcat.c strlcpy.$(OBJEXT): {$(VPATH)}strlcpy.c strstr.$(OBJEXT): {$(VPATH)}strstr.c -strtod.$(OBJEXT): {$(VPATH)}strtod.c -strtol.$(OBJEXT): {$(VPATH)}strtol.c nt.$(OBJEXT): {$(VPATH)}nt.c ia64.$(OBJEXT): {$(VPATH)}ia64.s $(CC) $(CFLAGS) -c $< diff --git a/include/ruby/missing.h b/include/ruby/missing.h index 3474ca256f..a3d7a6b7b7 100644 --- a/include/ruby/missing.h +++ b/include/ruby/missing.h @@ -214,12 +214,6 @@ RUBY_EXTERN char *strerror(int); RUBY_EXTERN char *strstr(const char *, const char *); #endif -/* -#ifndef HAVE_STRTOL -RUBY_EXTERN long strtol(const char *, char **, int); -#endif -*/ - #ifndef HAVE_STRLCPY RUBY_EXTERN size_t strlcpy(char *, const char*, size_t); #endif diff --git a/missing/strtol.c b/missing/strtol.c deleted file mode 100644 index 87bd73124c..0000000000 --- a/missing/strtol.c +++ /dev/null @@ -1,27 +0,0 @@ -/* public domain rewrite of strtol(3) */ - -#include "ruby/missing.h" -#include - -long -strtol(const char *nptr, char **endptr, int base) -{ - long result; - const char *p = nptr; - - while (isspace(*p)) { - p++; - } - if (*p == '-') { - p++; - result = -strtoul(p, endptr, base); - } - else { - if (*p == '+') p++; - result = strtoul(p, endptr, base); - } - if (endptr != 0 && *endptr == p) { - *endptr = (char *)nptr; - } - return result; -} diff --git a/win32/Makefile.sub b/win32/Makefile.sub index 7ca2671f25..9a3b3c7548 100644 --- a/win32/Makefile.sub +++ b/win32/Makefile.sub @@ -750,9 +750,6 @@ $(CONFIG_H): $(MKFILES) $(srcdir)/win32/Makefile.sub $(win_srcdir)/Makefile.sub #define HAVE_STRFTIME 1 #define HAVE_STRCHR 1 #define HAVE_STRSTR 1 -#define HAVE_STRTOD 1 -#define HAVE_STRTOL 1 -#define HAVE_STRTOUL 1 #define HAVE_FLOCK 1 #define HAVE_ISNAN 1 #define HAVE_FINITE 1 -- cgit v1.2.3