Closed Bug 5518 Opened 25 years ago Closed 24 years ago

Win32: PRSeekWhence values are passed to SetFilePointer.

Categories

(NSPR :: NSPR, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

In the NT and Win95 version of _PR_MD_LSEEK and
_PR_MD_LSEEK64 (ntio.c and w95io.c), the value
of PRSeekWhence (PR_SEEK_SET, PR_SEEK_CUR, or
PR_SEEK_END) is directly passed to SetFilePointer,
which expects one of FILE_BEGIN, FILE_CURRENT,
and FILE_END.  Although the PRSeekWhence constants
have the same values as their equivalent FILE_XXX
macros, this is bad programming style.

_PR_MD_LSEEK and _PR_MD_LSEEK64 should convert the
PRSeekWhence value to the equivalent FILE_XXX macro
and pass the FILE_XXX macro to SetFilePointer.
Status: NEW → ASSIGNED
Fixed for Win95.
/cvsroot/mozilla/nsprpub/pr/src/md/windows/w95io.c, revision 3.8.
NSPR now has its own Bugzilla product.  Moving this bug to the NSPR product.
phillip gone, removing him from qa contact, sorry for spam
Target Milestone: --- → 4.1
Checked in the fix for NT.
/cvsroot/mozilla/nsprpub/pr/src/md/windows/ntio.c, revision 3.26
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.