summaryrefslogtreecommitdiff
path: root/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 02:39:59 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2003-12-11 02:39:59 +0000
commitfaab8f264d035e98f07ed57e74fb53d11d1608e5 (patch)
tree3beaaaf1394b37df36570409af32a59af7d08aff /ruby.h
parentc5d4ee4a39df0f11a6ba98a8f5f19c9b64144baa (diff)
* 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
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/ruby.h b/ruby.h
index d90eaffe60..d258fa111f 100644
--- a/ruby.h
+++ b/ruby.h
@@ -36,16 +36,16 @@ extern "C" {
/* need to include <ctype.h> to use these macros */
#ifndef ISPRINT
-#define ISASCII(c) isascii((unsigned char)(c))
+#define ISASCII(c) isascii((int)(unsigned char)(c))
#undef ISPRINT
-#define ISPRINT(c) (ISASCII(c) && isprint((unsigned char)(c)))
-#define ISSPACE(c) (ISASCII(c) && isspace((unsigned char)(c)))
-#define ISUPPER(c) (ISASCII(c) && isupper((unsigned char)(c)))
-#define ISLOWER(c) (ISASCII(c) && islower((unsigned char)(c)))
-#define ISALNUM(c) (ISASCII(c) && isalnum((unsigned char)(c)))
-#define ISALPHA(c) (ISASCII(c) && isalpha((unsigned char)(c)))
-#define ISDIGIT(c) (ISASCII(c) && isdigit((unsigned char)(c)))
-#define ISXDIGIT(c) (ISASCII(c) && isxdigit((unsigned char)(c)))
+#define ISPRINT(c) (ISASCII(c) && isprint((int)(unsigned char)(c)))
+#define ISSPACE(c) (ISASCII(c) && isspace((int)(unsigned char)(c)))
+#define ISUPPER(c) (ISASCII(c) && isupper((int)(unsigned char)(c)))
+#define ISLOWER(c) (ISASCII(c) && islower((int)(unsigned char)(c)))
+#define ISALNUM(c) (ISASCII(c) && isalnum((int)(unsigned char)(c)))
+#define ISALPHA(c) (ISASCII(c) && isalpha((int)(unsigned char)(c)))
+#define ISDIGIT(c) (ISASCII(c) && isdigit((int)(unsigned char)(c)))
+#define ISXDIGIT(c) (ISASCII(c) && isxdigit((int)(unsigned char)(c)))
#endif
#define NORETURN_STYLE_NEW 1
@@ -53,7 +53,7 @@ extern "C" {
# define NORETURN(x) x
#endif
-#if defined(HAVE_ALLOCA_H) && !defined(__GNUC__)
+#if defined(HAVE_ALLOCA_H)
#include <alloca.h>
#endif