diff options
| author | 2013-09-23 21:47:24 -0400 | |
|---|---|---|
| committer | 2013-09-23 21:47:24 -0400 | |
| commit | 1114eb9aaf805851aa68146959b71e3fbbab36b0 (patch) | |
| tree | 543628f4b3bbe010cd571b1526c64babe48b0f9b /src/common | |
| parent | added utf8 to common module, utils for dealing with utf8 (diff) | |
| download | yuzu-1114eb9aaf805851aa68146959b71e3fbbab36b0.tar.gz yuzu-1114eb9aaf805851aa68146959b71e3fbbab36b0.tar.xz yuzu-1114eb9aaf805851aa68146959b71e3fbbab36b0.zip | |
added localtime_r for use on windows
Diffstat (limited to 'src/common')
| -rw-r--r-- | src/common/src/platform.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/common/src/platform.h b/src/common/src/platform.h index d610b418a..d8eacaa84 100644 --- a/src/common/src/platform.h +++ b/src/common/src/platform.h | |||
| @@ -70,9 +70,17 @@ | |||
| 70 | 70 | ||
| 71 | #if EMU_PLATFORM == PLATFORM_WINDOWS | 71 | #if EMU_PLATFORM == PLATFORM_WINDOWS |
| 72 | 72 | ||
| 73 | #include <time.h> | ||
| 74 | |||
| 73 | #define NOMINMAX | 75 | #define NOMINMAX |
| 74 | #define EMU_FASTCALL __fastcall | 76 | #define EMU_FASTCALL __fastcall |
| 75 | 77 | ||
| 78 | inline struct tm* localtime_r(const time_t *clock, struct tm *result) { | ||
| 79 | if (localtime_s(result, clock) == 0) | ||
| 80 | return result; | ||
| 81 | return NULL; | ||
| 82 | } | ||
| 83 | |||
| 76 | #else | 84 | #else |
| 77 | 85 | ||
| 78 | #define EMU_FASTCALL __attribute__((fastcall)) | 86 | #define EMU_FASTCALL __attribute__((fastcall)) |