http://d.puremagic.com/issues/show_bug.cgi?id=3409
Andrei Alexandrescu <and...@metalanguage.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED CC| |and...@metalanguage.com AssignedTo|nob...@puremagic.com |and...@metalanguage.com --- Comment #3 from Andrei Alexandrescu <and...@metalanguage.com> 2009-10-17 09:00:27 PDT --- The bug is in druntime. It defines fseek and ftell in core.stdc.stdio like this: int fseek(FILE* stream, long offset, int whence); c_long ftell(FILE* stream); And it defines c_long in core.stdc.config like this: version( Windows ) { alias int c_long; alias uint c_ulong; } else { static if( (void*).sizeof > int.sizeof ) { alias long c_long; alias ulong c_ulong; } else { alias int c_long; alias uint c_ulong; } } I don't know why under Windows c_long is actually 32 bit. Then, in my code I had this note: void seek(long offset, int origin = SEEK_SET) { enforce(p && p.handle, "Attempting to seek() in an unopened file"); // @@@ Dubious: why is fseek in std.c.stdio taking an int??? errnoEnforce(core.stdc.stdio.fseek( p.handle, to!int(offset), origin) == 0, "Could not seek in file `"~p.name~"'"); } So it seeme like there was something fishy going on. I emailed Sean about the problem. He needs to fix druntime, then I will fix stdio, and then we can close this. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------