Skip to content
Snippets Groups Projects
Commit 11f972c9 authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #746 from sleuthkit/tzname_fix

Added a platform specific define for tzname.
parents b1298794 56f0ae2f
Branches
Tags
No related merge requests found
...@@ -145,6 +145,7 @@ typedef WCHAR TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t ...@@ -145,6 +145,7 @@ typedef WCHAR TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t
#define TSNPRINTF _snwprintf #define TSNPRINTF _snwprintf
#define TPUTENV _wputenv #define TPUTENV _wputenv
#define TZSET _tzset #define TZSET _tzset
#define TZNAME _tzname
#if defined(_MSC_VER) #if defined(_MSC_VER)
#define TSTRTOULL _wcstoui64 #define TSTRTOULL _wcstoui64
...@@ -197,6 +198,7 @@ typedef char TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t ...@@ -197,6 +198,7 @@ typedef char TSK_TCHAR; ///< Character data type that is UTF-16 (wchar_t
#define TPUTENV putenv #define TPUTENV putenv
#define TZSET tzset #define TZSET tzset
#define TZNAME tzname
#define PRIcTSK _TSK_T("s") ///< sprintf macro to print a UTF-8 char string to TSK_TCHAR buffer #define PRIcTSK _TSK_T("s") ///< sprintf macro to print a UTF-8 char string to TSK_TCHAR buffer
#define PRIwTSK _TSK_T("S") ///< sprintf macro to print a UTF-16 wchar_t string to TSK_TCHAR buffer #define PRIwTSK _TSK_T("S") ///< sprintf macro to print a UTF-16 wchar_t string to TSK_TCHAR buffer
......
...@@ -305,7 +305,7 @@ tsk_fs_time_to_str(time_t time, char buf[128]) ...@@ -305,7 +305,7 @@ tsk_fs_time_to_str(time_t time, char buf[128])
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday, (int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
tmTime->tm_hour, tmTime->tm_hour,
(int) tmTime->tm_min, (int) tmTime->tm_sec, (int) tmTime->tm_min, (int) tmTime->tm_sec,
_tzname[(tmTime->tm_isdst == 0) ? 0 : 1]); TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
} }
return buf; return buf;
} }
...@@ -334,7 +334,7 @@ tsk_fs_time_to_str_subsecs(time_t time, unsigned int subsecs, ...@@ -334,7 +334,7 @@ tsk_fs_time_to_str_subsecs(time_t time, unsigned int subsecs,
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday, (int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
tmTime->tm_hour, tmTime->tm_hour,
(int) tmTime->tm_min, (int) tmTime->tm_sec, (int) tmTime->tm_min, (int) tmTime->tm_sec,
subsecs, _tzname[(tmTime->tm_isdst == 0) ? 0 : 1]); subsecs, TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
} }
return buf; return buf;
} }
...@@ -373,7 +373,7 @@ tsk_fs_print_day(FILE * hFile, time_t time) ...@@ -373,7 +373,7 @@ tsk_fs_print_day(FILE * hFile, time_t time)
tsk_fprintf(hFile, "%.4d-%.2d-%.2d 00:00:00 (%s)", tsk_fprintf(hFile, "%.4d-%.2d-%.2d 00:00:00 (%s)",
(int) tmTime->tm_year + 1900, (int) tmTime->tm_year + 1900,
(int) tmTime->tm_mon + 1, (int) tmTime->tm_mday, (int) tmTime->tm_mon + 1, (int) tmTime->tm_mday,
_tzname[(tmTime->tm_isdst == 0) ? 0 : 1]); TZNAME[(tmTime->tm_isdst == 0) ? 0 : 1]);
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment