From 0352d32f05b42bb31fe98e0fa3582ef4e4689e79 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: svn+ssh://ci.ruby-lang.org/ruby/trunk@14850 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- pack.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'pack.c') diff --git a/pack.c b/pack.c index 0df3c567ed..5d15a41027 100644 --- a/pack.c +++ b/pack.c @@ -492,7 +492,7 @@ pack_pack(VALUE ary, VALUE fmt) p++; } else if (ISDIGIT(*p)) { - len = strtoul(p, (char**)&p, 10); + len = STRTOUL(p, (char**)&p, 10); } else { len = 1; @@ -1351,7 +1351,7 @@ pack_unpack(VALUE str, VALUE fmt) p++; } else if (ISDIGIT(*p)) { - len = strtoul(p, (char**)&p, 10); + len = STRTOUL(p, (char**)&p, 10); } else { len = (type != '@'); -- cgit v1.2.3