diff --git a/ChangeLog b/ChangeLog index d6d1946d57..c5ad5eb5a7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Dec 6 21:45:10 2003 WATANABE Hirofumi + + * io.c (flush_before_seek): flush before seek on any platform. + + * configure.in: ditto. + Sat Dec 6 17:23:00 2003 NAKAMURA, Hiroshi * lib/soap/soap.rb(SOAP::Env.getenv): allow upcase environment variable diff --git a/configure.in b/configure.in index 23149915e4..74f9b4b348 100644 --- a/configure.in +++ b/configure.in @@ -636,10 +636,10 @@ RUBY_CHECK_IO_NEED(seek between R/W, rb_cv_need_io_seek_between_rw, yes) if test "$rb_cv_need_io_seek_between_rw" = yes; then AC_DEFINE(NEED_IO_SEEK_BETWEEN_RW, 1) fi -RUBY_CHECK_IO_NEED(flush before seek, rb_cv_need_io_flush_before_seek, no) -if test "$rb_cv_need_io_flush_before_seek" = yes; then - AC_DEFINE(NEED_IO_FLUSH_BEFORE_SEEK, 1) -fi +dnl RUBY_CHECK_IO_NEED(flush before seek, rb_cv_need_io_flush_before_seek, no) +dnl if test "$rb_cv_need_io_flush_before_seek" = yes; then +dnl AC_DEFINE(NEED_IO_FLUSH_BEFORE_SEEK, 1) +dnl fi AC_CACHE_CHECK([whether st_ino is huge], rb_cv_huge_st_ino, [AC_COMPILE_IFELSE([AC_LANG_BOOL_COMPILE_TRY([ diff --git a/io.c b/io.c index 639e207693..06d9283102 100644 --- a/io.c +++ b/io.c @@ -194,7 +194,6 @@ rb_io_check_closed(fptr) static void io_fflush _((FILE *, OpenFile *)); -#if NEED_IO_FLUSH_BEFORE_SEEK static OpenFile * flush_before_seek(fptr) OpenFile *fptr; @@ -204,9 +203,6 @@ flush_before_seek(fptr) } return fptr; } -#else -#define flush_before_seek(fptr) fptr -#endif #define io_seek(fptr, ofs, whence) fseeko(flush_before_seek(fptr)->f, ofs, whence) #define io_tell(fptr) ftello(flush_before_seek(fptr)->f)