http://d.puremagic.com/issues/show_bug.cgi?id=2689
Summary: seek behaves incorrectly on MAC OSX Product: D Version: 1.040 Platform: Macintosh OS/Version: Mac OS X Status: NEW Severity: normal Priority: P2 Component: DMD AssignedTo: bugzi...@digitalmars.com ReportedBy: swadena...@gmail.com The following code behaves differently on OSX than LINUX (DMD 1.040): import std.stdio; import std.stream; import std.file; int Lines(Stream f) { int ln = 0; foreach (char[] line; f) ln++; return ln; } void main(char[][] args) { auto f = new BufferedFile(args[1]); int l = Lines(f); f.seek(0, SeekPos.Set); int r = Lines(f); fwritef(stderr, "Lines before: %d, Lines after: %d\n", l, r); } Results for OSX: Lines before: 1633, Lines after: 0 Results for LINUX Lines before: 1633, Lines after: 1633 Seek not working properly perhaps? wade --