Change 33344 by [EMAIL PROTECTED] on 2008/02/22 12:17:17

        Silence warning from VC8 when building without USE_LARGE_FILES

Affected files ...

... //depot/perl/win32/win32io.c#22 edit

Differences ...

==== //depot/perl/win32/win32io.c#22 (text) ====
Index: perl/win32/win32io.c
--- perl/win32/win32io.c#21~24946~      2005-06-23 02:00:28.000000000 -0700
+++ perl/win32/win32io.c        2008-02-22 04:17:17.000000000 -0800
@@ -256,7 +256,11 @@
 {
  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 @@
  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;
 }
End of Patch.

Reply via email to