diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-31 06:34:10 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-31 06:34:10 +0000 |
commit | 17c3d539f008c3ad4179e520511b6a64fb4ba969 (patch) | |
tree | 6a277eed8c128f9212b0ef8316750e697701059d /ruby.h | |
parent | dc136c12ee4d704de7621408ab0a5d9108284b45 (diff) |
* ruby.h: use ifdef (or defined) for macro constants that may or
may not be defined to shut up gcc's -Wundef warnings.
[ruby-core:08447]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ruby.h')
-rw-r--r-- | ruby.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -102,7 +102,7 @@ typedef unsigned long ID; # endif #endif -#if HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG # ifndef LLONG_MAX # ifdef LONG_LONG_MAX # define LLONG_MAX LONG_LONG_MAX @@ -144,7 +144,7 @@ VALUE rb_uint2inum _((unsigned long)); #define ULONG2NUM(v) UINT2NUM(v) #define rb_uint_new(v) rb_uint2inum(v) -#if HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG VALUE rb_ll2inum _((LONG_LONG)); #define LL2NUM(v) rb_ll2inum(v) VALUE rb_ull2inum _((unsigned LONG_LONG)); @@ -265,14 +265,14 @@ unsigned long rb_fix2uint _((VALUE)); #define FIX2UINT(x) ((unsigned int)FIX2ULONG(x)) #endif -#if HAVE_LONG_LONG +#ifdef HAVE_LONG_LONG LONG_LONG rb_num2ll _((VALUE)); unsigned LONG_LONG rb_num2ull _((VALUE)); # define NUM2LL(x) (FIXNUM_P(x)?FIX2LONG(x):rb_num2ll((VALUE)x)) # define NUM2ULL(x) rb_num2ull((VALUE)x) #endif -#if HAVE_LONG_LONG && SIZEOF_OFF_T > SIZEOF_LONG +#if defined(HAVE_LONG_LONG) && SIZEOF_OFF_T > SIZEOF_LONG # define NUM2OFFT(x) ((off_t)NUM2LL(x)) #else # define NUM2OFFT(x) NUM2LONG(x) |