|
From: Andreas R. <and...@us...> - 2002-05-05 17:18:06
|
Update of /cvsroot/squeak/squeak/platforms/win32/vm
In directory usw-pr-cvs1:/tmp/cvs-serv28838/vm
Modified Files:
sqPlatformSpecific.h sqWin32Directory.c
Log Message:
added large file support
Index: sqPlatformSpecific.h
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqPlatformSpecific.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** sqPlatformSpecific.h 28 Jan 2002 14:23:48 -0000 1.4
--- sqPlatformSpecific.h 5 May 2002 17:18:02 -0000 1.5
***************
*** 16,21 ****
#include "sqWin32Alloc.h"
! #define squeakFileOffsetType int
! #define size_t int
#ifdef WIN32_FILE_SUPPORT
--- 16,24 ----
#include "sqWin32Alloc.h"
! #ifdef _MSC_VER
! #define squeakFileOffsetType __uint64
! #else
! #define squeakFileOffsetType unsigned long long
! #endif
#ifdef WIN32_FILE_SUPPORT
Index: sqWin32Directory.c
===================================================================
RCS file: /cvsroot/squeak/squeak/platforms/win32/vm/sqWin32Directory.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** sqWin32Directory.c 4 May 2002 23:20:28 -0000 1.2
--- sqWin32Directory.c 5 May 2002 17:18:02 -0000 1.3
***************
*** 35,38 ****
--- 35,46 ----
static TCHAR DOT[] = TEXT(".");
+ typedef union {
+ struct {
+ DWORD dwLow;
+ DWORD dwHigh;
+ };
+ squeakFileOffsetType offset;
+ } win32FileOffset;
+
DWORD convertToSqueakTime(SYSTEMTIME st)
{ DWORD secs;
***************
*** 70,74 ****
int dir_Lookup(char *pathString, int pathStringLength, int index,
/* outputs: */ char *name, int *nameLength, int *creationDate, int *modificationDate,
! int *isDirectory, int *sizeIfFile)
{
/* Lookup the index-th entry of the directory with the given path, starting
--- 78,82 ----
int dir_Lookup(char *pathString, int pathStringLength, int index,
/* outputs: */ char *name, int *nameLength, int *creationDate, int *modificationDate,
! int *isDirectory, squeakFileOffsetType *sizeIfFile)
{
/* Lookup the index-th entry of the directory with the given path, starting
***************
*** 192,198 ****
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
*isDirectory= true;
! else
! *sizeIfFile= findData.nFileSizeLow; /* assuming that this is enough ;-) */
!
return ENTRY_FOUND;
}
--- 200,209 ----
if (findData.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
*isDirectory= true;
! else {
! win32FileOffset ofs;
! ofs.dwLow = findData.nFileSizeLow;
! ofs.dwHigh = findData.nFileSizeHigh;
! *sizeIfFile = ofs.offset;
! }
return ENTRY_FOUND;
}
|