Dan Sully <[EMAIL PROTECTED]> writes:
>* Nick Ing-Simmons <[EMAIL PROTECTED]> shaped the electrons to say...
>
>> I have seen weird fails like this when varying large file support
>> and 64/32 bit IV Configure options.
>> 
>> What happens is that 'offset' (your variable) is wrong size for Off_t 
>> and PerlIO_seek mis-interprets what it gets in its incoming args.
>> 
>> You seem to have a small-file 32-bit perl (from -V output below).
>
>That is correct. And yes, the 'offset' is really a 'ogg_int64_t'. Although
>it's certainly not a 64bit value. 

'ogg' ?? 
How big is it.

>I've tried casting it to a Off_t to no effect.

Hmm, perhaps Off_t itself is off.
Did you pass same -D flags to your compile as perl build?
For 32-bit build perl uses off_t as Off_t - which is all very well
but Linux at least varies size of off_t based 
on -D options of _your_ compile.  
So if your command line or one of headers included by your XS code 
defines (say) __USE_FILE_OFFSET64 things get confused.

>
>Suggestions here? 

Add some diagnostics to XS code e.g.
  warn("Passing offset size=%d Off_t=%d",sizeof(offset),sizeof(Off_t));

Can I/we see:
  A. Your declaration of "offset"
  B. Typedef(s) of types involved from any system/library .h files?
  C. CPP-ed code of call to PerlIO_seek().

You can get (C) by 
   make Foo.i 

where you have a Foo.xs 

>This is something that needs to really work on at the very
>least Linux/*BSD, Win32 & OSX.
>
>thanks.
>
>-D

Reply via email to