* 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/trunk@10648 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
matz 2006-07-31 06:34:10 +00:00
Родитель 4c86e4a580
Коммит ec85d62a07
2 изменённых файлов: 18 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,9 @@
Mon Jul 31 09:22:12 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* 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]
Mon Jul 31 13:38:13 2006 GOTOU Yuuzou <gotoyuzo@notwork.org>
* lib/webrick/httprequest.rb (WEBrick::HTTPReuqest#parse_uri): improve
@ -18,6 +24,13 @@ Sat Jul 29 06:12:06 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
* ext/tk/lib/multi-tk.rb: freeze ip_name for security reason.
Sat Jul 29 01:23:52 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
* lib/logger.rb: improves the amount of documentation that Rdoc
picks up when processing logger.rb by moving the require
statement back before the comment block. a patch from Hugh
Sasse <hgs at dmu.ac.uk>. [ruby-core:08422]
Fri Jul 28 17:18:03 2006 Nobuyoshi Nakada <nobu@ruby-lang.org>
* ext/curses/curses.c (NUM2CH, CH2FIX): use single char strings.

10
ruby.h
Просмотреть файл

@ -125,7 +125,7 @@ typedef unsigned LONG_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
@ -151,7 +151,7 @@ typedef unsigned LONG_LONG ID;
# endif
#endif
#if LONG_LONG_VALUE
#ifdef LONG_LONG_VALUE
# define FIXNUM_MAX (LLONG_MAX>>1)
# define FIXNUM_MIN RSHIFT((LONG_LONG)LLONG_MIN,1)
#else
@ -172,7 +172,7 @@ VALUE rb_uint2inum(VALUE);
#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);
@ -296,14 +296,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)