From faab8f264d035e98f07ed57e74fb53d11d1608e5 Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 11 Dec 2003 02:39:59 +0000 Subject: * configure.in (ieeefp.h), numeric.c: needed for finite() on Solaris. [ruby-core:01921] * file.c (rb_stat_inspect): adjust format specifier. * parse.c (arg_prepend): nodetype() is for debug use. * ruby.h (ISASCII, etc): cast to int to get rid of warning. * ruby.h (alloca.h): include even in GCC. [ruby-core:01925] * ext/bigdecimal/bigdecimal.c (GetVpValue): adjust format specifier. * ext/bigdecimal/bigdecimal.c (BigDecimal_prec, BigDecimal_coerce, BigDecimal_divmod): use rb_assoc_new() to suppress memory usage. * ext/bigdecimal/bigdecimal.c (BigDecimal_split): ditto. * ext/dl/sym.c (rb_dlsym_guardcall): guard itself should be volatile. * ext/iconv/iconv.c (iconv_convert): ensure actual parameter with format specifier. * ext/pty/pty.c (MasterDevice, SlaveDevice, deviceNo): do not define unless used. * ext/pty/pty.c (getDevice): get rid of warning. * ext/socket/socket.c (port_str, sock_s_getaddrinfo, sock_s_getnameinfo): FIX2INT() now returns long. * ext/socket/socket.c (init_inetsock_internal): uninitialized variable. * ext/syck/rubyext.c (syck_parser_assign_io): add prototype. * ext/syck/rubyext.c (rb_syck_mktime, yaml_org_handler): use ISDIGIT() instead of isdigit() to avoid warnings and for platforms which don't support non-ascii charater. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/socket.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'ext/socket') diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 5cebe593bc..e842603067 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -596,7 +596,7 @@ port_str(port, pbuf, len) return 0; } else if (FIXNUM_P(port)) { - snprintf(pbuf, len, "%d", FIX2INT(port)); + snprintf(pbuf, len, "%ld", FIX2LONG(port)); return pbuf; } else { @@ -893,7 +893,7 @@ init_inetsock_internal(arg) { int type = arg->type; struct addrinfo *res; - int fd, status; + int fd, status = 0; char *syscall; arg->remote.res = sock_addrinfo(arg->remote.host, arg->remote.serv, SOCK_STREAM, @@ -2106,7 +2106,7 @@ sock_s_getaddrinfo(argc, argv) pptr = NULL; } else if (FIXNUM_P(port)) { - snprintf(pbuf, sizeof(pbuf), "%d", FIX2INT(port)); + snprintf(pbuf, sizeof(pbuf), "%ld", FIX2LONG(port)); pptr = pbuf; } else { @@ -2225,7 +2225,7 @@ sock_s_getnameinfo(argc, argv) pptr = NULL; } else if (FIXNUM_P(port)) { - snprintf(pbuf, sizeof(pbuf), "%d", NUM2INT(port)); + snprintf(pbuf, sizeof(pbuf), "%ld", NUM2LONG(port)); pptr = pbuf; } else { -- cgit v1.2.3