From 6cdf6aea2c658fd1b5a031aee2c316b7c632171d Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 30 May 2008 16:16:03 +0000 Subject: [PATCH] [SIGAR-108] windows lfs support --- src/sigar_fileinfo.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sigar_fileinfo.c b/src/sigar_fileinfo.c index e48f8ceb..1bb674bb 100644 --- a/src/sigar_fileinfo.c +++ b/src/sigar_fileinfo.c @@ -52,8 +52,10 @@ * . */ +#ifndef WIN32 #define _FILE_OFFSET_BITS 64 #define _LARGEFILE64_SOURCE +#endif /* * whittled down version of apr/file_info/{unix,win32}/filestat.c @@ -199,10 +201,8 @@ static void fillin_fileattrs(sigar_file_attrs_t *finfo, finfo->ctime = sigar_FileTimeToTime(&wininfo->ftCreationTime) / 1000; finfo->mtime = sigar_FileTimeToTime(&wininfo->ftLastWriteTime) / 1000; - finfo->size = (sigar_uint64_t)sizes[1]; - if (finfo->size < 0 || sizes[0]) { - finfo->size = 0x7fffffff; - } + finfo->size = + (sigar_uint64_t)sizes[1] | ((sigar_uint64_t)sizes[0] << 32); if (linkinfo && (wininfo->dwFileAttributes & FILE_ATTRIBUTE_REPARSE_POINT)) {