summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--include/ruby/ruby.h4
-rw-r--r--io.c3
3 files changed, 11 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index b1173f54f8..d745261ef2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Sun May 9 02:37:33 2010 URABE Shyouhei <shyouhei@ruby-lang.org>
+
+ * io.c (nogvl_copy_stream_sendfile): mixed decls not allowed.
+
+ * include/ruby/ruby.h (rb_intern): C90 needs nonempty macro
+ arguments.
+
Sun May 9 01:15:18 2010 Nobuyoshi Nakada <nobu@ruby-lang.org>
* cont.c (stackgrowdirection): removed duplicated code, use
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index a9fd974614..38edfb3965 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1078,8 +1078,8 @@ VALUE rb_id2str(ID);
/* __builtin_constant_p and statement expression is available
* since gcc-2.7.2.3 at least. */
#define rb_intern(str) \
- (__builtin_constant_p(str) ? \
- __extension__ (CONST_ID_CACHE(/**/, str)) : \
+ (__builtin_constant_p(str) ?
+ __extension__ (CONST_ID_CACHE((ID), str)) : \
rb_intern(str))
#define rb_intern_const(str) \
(__builtin_constant_p(str) ? \
diff --git a/io.c b/io.c
index f9c01f3839..eccc93b141 100644
--- a/io.c
+++ b/io.c
@@ -8078,8 +8078,9 @@ nogvl_copy_stream_sendfile(struct copy_stream_struct *stp)
if (use_pread)
copy_length = src_stat.st_size - src_offset;
else {
+ off_t cur;
errno = 0;
- off_t cur = lseek(stp->src_fd, 0, SEEK_CUR);
+ cur = lseek(stp->src_fd, 0, SEEK_CUR);
if (cur == (off_t)-1 && errno) {
stp->syserr = "lseek";
stp->error_no = errno;