diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-02 06:24:27 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-02 06:24:27 +0000 |
commit | 9c8a38e7aae3d71903c3b4364d8190bbdfee1532 (patch) | |
tree | 9f6bc245a678bd5c4d451053ab221395692c4d30 /ext/socket | |
parent | 1e6335524f41e99f746b8bd9fbe44cd011324784 (diff) | |
download | ruby-9c8a38e7aae3d71903c3b4364d8190bbdfee1532.tar.gz ruby-9c8a38e7aae3d71903c3b4364d8190bbdfee1532.tar.xz ruby-9c8a38e7aae3d71903c3b4364d8190bbdfee1532.zip |
* 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
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index c7b2c928b..01294b218 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -817,7 +817,7 @@ str_isnumber(const char *p) if (!p || *p == '\0') return 0; ep = NULL; - (void)strtoul(p, &ep, 10); + (void)STRTOUL(p, &ep, 10); if (ep && *ep == '\0') return 1; else @@ -3165,7 +3165,7 @@ sock_s_getservbyname(int argc, VALUE *argv) char *s = RSTRING_PTR(service); char *end; - port = strtoul(s, &end, 0); + port = STRTOUL(s, &end, 0); if (*end != '\0') { rb_raise(rb_eSocket, "no such service %s/%s", s, RSTRING_PTR(proto)); } |