From: <dg...@su...> - 2009-01-13 20:35:38
|
Author: friedrich.beckmann Date: Tue Jan 13 21:34:50 2009 New Revision: 5131 URL: http://www.opensync.org/changeset/5131 Log: windows port - localtime_r and gmtime_r are not available in windows (export for test) Modified: trunk/opensync/format/opensync_time.h Modified: trunk/opensync/format/opensync_time.h ============================================================================== --- trunk/opensync/format/opensync_time.h Tue Jan 13 21:17:46 2009 (r5130) +++ trunk/opensync/format/opensync_time.h Tue Jan 13 21:34:50 2009 (r5131) @@ -349,6 +349,14 @@ */ 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_*/ |