digitalmars.D.bugs - [Issue 7822] New: lseek cast(int)offset should be lseek cast(off_t)offset
- d-bugmail puremagic.com (29/29) Apr 04 2012 http://d.puremagic.com/issues/show_bug.cgi?id=7822
http://d.puremagic.com/issues/show_bug.cgi?id=7822 Summary: lseek cast(int)offset should be lseek cast(off_t)offset Product: D Version: D2 Platform: All OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Phobos AssignedTo: nobody puremagic.com ReportedBy: jayn prismnet.com --- Comment #0 from Jay Norwood <jayn prismnet.com> 2012-04-04 14:18:53 PDT --- cast(int)offset is found in lseek parameter in several places in the phobos library code. phobos\mmfile.d(137): lseek(fd, cast(int)(size - 1), SEEK_SET); phobos\mmfile.d(362): .lseek(fd, cast(int)(size - 1), SEEK_SET); phobos\stream.d(1992): auto result = lseek(hFile, cast(int)offset, rel); phobos\std\mmfile.d(130): lseek(fd, cast(int)(size - 1), SEEK_SET); \phobos\std\stream.d(1987): auto result = lseek(hFile, cast(int)offset, rel); I'd guess these int casts are contrary to the intent of the use of off_t redefinition to support 64 bit operations on linux and so the casts of the offset parameter should be changed to cast(off_t) in each of these cases. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Apr 04 2012