diff options
author | Chris Wilson <chris+github@qwirx.com> | 2006-09-04 00:09:26 +0000 |
---|---|---|
committer | Chris Wilson <chris+github@qwirx.com> | 2006-09-04 00:09:26 +0000 |
commit | 012c1b4c977bc94d4f8859c04890223f48881463 (patch) | |
tree | f3f8f0c413c7520ba1810ab3e761fef1a01e109e /lib/win32/emu.h | |
parent | 502fa3141e5330a0e2e91ff4d7258f3f3c0fcaa6 (diff) |
(refs #3)
Remove inline ConvertFileTimeToTime_t, add prototypes for new versions
in emu.cpp
Diffstat (limited to 'lib/win32/emu.h')
-rw-r--r-- | lib/win32/emu.h | 26 |
1 files changed, 3 insertions, 23 deletions
diff --git a/lib/win32/emu.h b/lib/win32/emu.h index 2e9f8cd0..54280769 100644 --- a/lib/win32/emu.h +++ b/lib/win32/emu.h @@ -372,29 +372,9 @@ int emu_stat(const char * name, struct stat * st); 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; - - // 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; -} +// need this for conversions +time_t ConvertFileTimeToTime_t(FILETIME *fileTime); +bool ConvertTime_tToFileTime(const time_t from, FILETIME *pTo); #ifdef _MSC_VER #define stat(filename, struct) emu_stat (filename, struct) |