From: Bertram Scharpf Date: 2007-08-16T20:27:18+09:00 Subject: Re: IO#seek and whence problem Hi, Am Mittwoch, 15. Aug 2007, 18:39:10 +0900 schrieb Brian Candler: > On Wed, Aug 15, 2007 at 05:38:38PM +0900, Bertram Scharpf wrote: > > I completely turned off optimization and distcc. > > > > In I put the following debug statements: > > > > static VALUE > > rb_io_seek(io, offset, whence) > > VALUE io, offset; > > int whence; > > { > > OpenFile *fptr; > > off_t pos; > > > > fprintf( stderr, "rb_io_seek: A; whence=%d\n", pos, whence); > > Two arguments, one format specifier? > > > pos = NUM2OFFT(offset); > > fprintf( stderr, "rb_io_seek: B; pos=%d, whence=%d\n", pos, whence); > > Remember that %d consumes an 'int', and off_t may be larger than int on your > platform. Arrrgh! Not more than a typo. Anyway, this lead me to the core problem. There seems to be some kind of mismatch between HAVE_OFF_T and HAVE_FSEEKO. When I change 681c681 < off_t pos; --- > int pos; everything works properly. Seems to be a real bug. Bertram