From 20fb6c57f80daad7be57208981e0b60d62ee9bd6 Mon Sep 17 00:00:00 2001 From: "friedrich.beckmann" Date: Tue, 13 Jan 2009 20:34:50 +0000 Subject: [PATCH] windows port - localtime_r and gmtime_r are not available in windows (export for test) git-svn-id: https://svn.opensync.org/trunk/trunk@5131 53f5c7ee-bee3-0310-bbc5-ea0e15fffd5e --- opensync/format/opensync_time.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/opensync/format/opensync_time.h b/opensync/format/opensync_time.h index 3387e831..4e488be6 100644 --- a/opensync/format/opensync_time.h +++ b/opensync/format/opensync_time.h @@ -349,6 +349,14 @@ OSYNC_EXPORT int osync_time_str2wday(const char *swday); */ OSYNC_EXPORT struct tm *osync_time_relative2tm(const char *byday, const int bymonth, const int year); +#ifdef _WIN32 +/* Windows does not provide gmtime_r and localtime_r */ +/* This module uses these two functions internally */ +/* They are also exported for testing purposes */ +OSYNC_TEST_EXPORT inline struct tm* gmtime_r (const time_t *clock, struct tm *result); +OSYNC_TEST_EXPORT inline struct tm* localtime_r (const time_t *clock, struct tm *result); +#endif /* _WIN32 */ + /*@}*/ #endif /*_OPENSYNC_TIME_H_*/ -- 2.11.4.GIT