summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorSteve Hay <SteveHay@planit.com>2008-02-22 12:17:17 +0000
committerSteve Hay <SteveHay@planit.com>2008-02-22 12:17:17 +0000
commit3caf316a13f5dcb18f6ada1f6b447887564ff3ae (patch)
treedddc07dedf17784e063bc64107d7d0042e2fb454 /win32
parent9ec7171b93c2f7e007fcbb49144b664695f0d21b (diff)
downloadperl-3caf316a13f5dcb18f6ada1f6b447887564ff3ae.tar.gz
Silence warning from VC8 when building without USE_LARGE_FILES
p4raw-id: //depot/perl@33344
Diffstat (limited to 'win32')
-rw-r--r--win32/win32io.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/win32/win32io.c b/win32/win32io.c
index 5ba46a71d3..a3981c000a 100644
--- a/win32/win32io.c
+++ b/win32/win32io.c
@@ -256,7 +256,11 @@ PerlIOWin32_seek(pTHX_ PerlIO *f, Off_t offset, int whence)
{
static const DWORD where[3] = { FILE_BEGIN, FILE_CURRENT, FILE_END };
PerlIOWin32 *s = PerlIOSelf(f,PerlIOWin32);
- DWORD high = (sizeof(offset) > sizeof(DWORD)) ? (DWORD)(offset >> 32) : 0;
+#if Off_t_size >= 8
+ DWORD high = (DWORD)(offset >> 32);
+#else
+ DWORD high = 0;
+#endif
DWORD low = (DWORD) offset;
DWORD res = SetFilePointer(s->h,(LONG)low,(LONG *)&high,where[whence]);
if (res != 0xFFFFFFFF || GetLastError() != NO_ERROR)
@@ -277,7 +281,11 @@ PerlIOWin32_tell(pTHX_ PerlIO *f)
DWORD res = SetFilePointer(s->h,0,(LONG *)&high,FILE_CURRENT);
if (res != 0xFFFFFFFF || GetLastError() != NO_ERROR)
{
+#if Off_t_size >= 8
return ((Off_t) high << 32) | res;
+#else
+ return res;
+#endif
}
return (Off_t) -1;
}