From 9c8a38e7aae3d71903c3b4364d8190bbdfee1532 Mon Sep 17 00:00:00 2001 From: akr Date: Wed, 2 Jan 2008 06:24:27 +0000 Subject: * util.c (ruby_strtoul): locale independent strtoul is implemented to avoid "i".to_i(36) cause 0 under tr_TR locale. This is newly implemented, not a copy of missing/strtoul.c. * include/ruby/ruby.h (ruby_strtoul): declared. (STRTOUL): defined to use ruby_strtoul. * bignum.c, pack.c, ext/socket/socket.c: use STRTOUL. * configure.in (strtoul): don't check. * missing/strtoul.c: removed. * include/ruby/missing.h (strtoul): removed. * common.mk (strtoul.o): removed. * LEGAL (missing/strtoul.c): removed. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- include/ruby/ruby.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/ruby/ruby.h') diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index 8ce623dfe..c5184f7ca 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -986,4 +986,7 @@ int rb_remove_event_hook(rb_event_hook_func_t func); #define STRCASECMP(s1, s2) (st_strcasecmp(s1, s2)) #define STRNCASECMP(s1, s2, n) (st_strncasecmp(s1, s2, n)) +unsigned long ruby_strtoul(const char *str, char **endptr, int base); +#define STRTOUL(str, endptr, base) (ruby_strtoul(str, endptr, base)) + #endif /* RUBY_H */ -- cgit