Mercurial > libpst
comparison src/timeconv.c @ 172:6954d315aaa8
move version-info into main configure.in, and set it properly.
prefix all external symbols in the shared library with pst_ to avoid symbol clashes with other shared libraries.
author | Carl Byington <carl@five-ten-sg.com> |
---|---|
date | Sat, 04 Apr 2009 16:00:48 -0700 |
parents | fc11b1d1ad34 |
children | b65e8d0a088a |
comparison
equal
deleted
inserted
replaced
171:6c1e75bc4cac | 172:6954d315aaa8 |
---|---|
13 | 13 |
14 #ifndef _WIN32 | 14 #ifndef _WIN32 |
15 | 15 |
16 #include "define.h" | 16 #include "define.h" |
17 | 17 |
18 char * fileTimeToAscii (const FILETIME *filetime) { | 18 char * pst_fileTimeToAscii (const FILETIME *filetime) { |
19 time_t t1; | 19 time_t t1; |
20 | 20 |
21 t1 = fileTimeToUnixTime(filetime, NULL); | 21 t1 = pst_fileTimeToUnixTime(filetime, NULL); |
22 return ctime(&t1); | 22 return ctime(&t1); |
23 } | 23 } |
24 | 24 |
25 struct tm * fileTimeToStructTM (const FILETIME *filetime) { | 25 struct tm * pst_fileTimeToStructTM (const FILETIME *filetime) { |
26 time_t t1; | 26 time_t t1; |
27 t1 = fileTimeToUnixTime(filetime, NULL); | 27 t1 = pst_fileTimeToUnixTime(filetime, NULL); |
28 return gmtime(&t1); | 28 return gmtime(&t1); |
29 } | 29 } |
30 | 30 |
31 /*********************************************************************** | 31 /*********************************************************************** |
32 * DOSFS_FileTimeToUnixTime | 32 * DOSFS_FileTimeToUnixTime |
33 * | 33 * |
34 * Convert a FILETIME format to Unix time. | 34 * Convert a FILETIME format to Unix time. |
35 * If not NULL, 'remainder' contains the fractional part of the filetime, | 35 * If not NULL, 'remainder' contains the fractional part of the filetime, |
36 * in the range of [0..9999999] (even if time_t is negative). | 36 * in the range of [0..9999999] (even if time_t is negative). |
37 */ | 37 */ |
38 time_t fileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder ) | 38 time_t pst_fileTimeToUnixTime( const FILETIME *filetime, DWORD *remainder ) |
39 { | 39 { |
40 /* Read the comment in the function DOSFS_UnixTimeToFileTime. */ | 40 /* Read the comment in the function DOSFS_UnixTimeToFileTime. */ |
41 #if USE_LONG_LONG | 41 #if USE_LONG_LONG |
42 | 42 |
43 long long int t = filetime->dwHighDateTime; | 43 long long int t = filetime->dwHighDateTime; |