[Box Backup-commit] COMMIT r1136 - box/trunk/lib/win32
boxbackup-dev@fluffy.co.uk
boxbackup-dev@fluffy.co.uk
Fri, 27 Oct 2006 20:28:05 +0100
Author: chris
Date: 2006-10-27 20:28:05 +0100 (Fri, 27 Oct 2006)
New Revision: 1136
Modified:
box/trunk/lib/win32/emu.h
Log:
Remove inline ConvertFileTimeToTime_t, add prototypes for new versions
in emu.cpp.
Modified: box/trunk/lib/win32/emu.h
===================================================================
--- box/trunk/lib/win32/emu.h 2006-10-27 19:27:30 UTC (rev 1135)
+++ box/trunk/lib/win32/emu.h 2006-10-27 19:28:05 UTC (rev 1136)
@@ -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)