[Box Backup-commit] COMMIT r965 - box/chris/merge/lib/win32
subversion@fluffy.co.uk
subversion@fluffy.co.uk
Mon, 04 Sep 2006 01:09:26 +0100
Author: chris
Date: 2006-09-04 01:09:26 +0100 (Mon, 04 Sep 2006)
New Revision: 965
Modified:
box/chris/merge/lib/win32/emu.h
Log:
(refs #3)
Remove inline ConvertFileTimeToTime_t, add prototypes for new versions
in emu.cpp
Modified: box/chris/merge/lib/win32/emu.h
===================================================================
--- box/chris/merge/lib/win32/emu.h 2006-09-04 00:08:36 UTC (rev 964)
+++ box/chris/merge/lib/win32/emu.h 2006-09-04 00:09:26 UTC (rev 965)
@@ -372,30 +372,10 @@
int emu_fstat(HANDLE file, struct stat * st);
int statfs(const char * name, struct statfs * s);
-//need this for converstions
-inline time_t ConvertFileTimeToTime_t(FILETIME *fileTime)
-{
- SYSTEMTIME stUTC;
- struct tm timeinfo;
+// need this for conversions
+time_t ConvertFileTimeToTime_t(FILETIME *fileTime);
+bool ConvertTime_tToFileTime(const time_t from, FILETIME *pTo);
- // Convert the last-write time to local time.
- FileTimeToSystemTime(fileTime, &stUTC);
- // SystemTimeToTzSpecificLocalTime(NULL, &stUTC, &stLocal);
-
- memset(&timeinfo, 0, sizeof(timeinfo));
- timeinfo.tm_sec = stUTC.wSecond;
- timeinfo.tm_min = stUTC.wMinute;
- timeinfo.tm_hour = stUTC.wHour;
- timeinfo.tm_mday = stUTC.wDay;
- timeinfo.tm_wday = stUTC.wDayOfWeek;
- timeinfo.tm_mon = stUTC.wMonth - 1;
- // timeinfo.tm_yday = ...;
- timeinfo.tm_year = stUTC.wYear - 1900;
-
- time_t retVal = mktime(&timeinfo) - _timezone;
- return retVal;
-}
-
#ifdef _MSC_VER
#define stat(filename, struct) emu_stat (filename, struct)
#define lstat(filename, struct) emu_stat (filename, struct)