From: <svn...@op...> - 2009-03-28 19:58:27
|
Author: dgollub Date: Sat Mar 28 20:58:10 2009 New Revision: 5405 URL: http://www.opensync.org/changeset/5405 Log: Remove gmtime_r and localtime_r, which are only used internally, from the public API header. Added: trunk/opensync/format/opensync_time_internals.h Modified: trunk/opensync/format/opensync_time.c trunk/opensync/format/opensync_time.h trunk/tests/format-tests/check_time.c Modified: trunk/opensync/format/opensync_time.c ============================================================================== --- trunk/opensync/format/opensync_time.c Sat Mar 28 20:50:04 2009 (r5404) +++ trunk/opensync/format/opensync_time.c Sat Mar 28 20:58:10 2009 (r5405) @@ -24,6 +24,7 @@ #include "opensync.h" #include "opensync_time.h" +#include "opensync_time_internals.h" #include "opensync_time_private.h" #include "opensync_internals.h" Modified: trunk/opensync/format/opensync_time.h ============================================================================== --- trunk/opensync/format/opensync_time.h Sat Mar 28 20:50:04 2009 (r5404) +++ trunk/opensync/format/opensync_time.h Sat Mar 28 20:58:10 2009 (r5405) @@ -349,14 +349,6 @@ */ 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_*/ Added: trunk/opensync/format/opensync_time_internals.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/opensync/format/opensync_time_internals.h Sat Mar 28 20:58:10 2009 (r5405) @@ -0,0 +1,36 @@ +/* +* libopensync - A synchronization framework +* Copyright (C) 2004-2005 Armin Bauer <arm...@op...> +* Copyright (C) 2006-2008 Daniel Gollub <dg...@su...> +* Copyright (C) 2007 Chris Frey <cd...@ne...> +* +* This library is free software; you can redistribute it and/or +* modify it under the terms of the GNU Lesser General Public +* License as published by the Free Software Foundation; either +* version 2.1 of the License, or (at your option) any later version. +* +* This library is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +* Lesser General Public License for more details. +* +* You should have received a copy of the GNU Lesser General Public +* License along with this library; if not, write to the Free Software +* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +* +*/ + +#ifndef _OPENSYNC_TIME_INTERNALS_H_ +#define _OPENSYNC_TIME_INTERNALS_H_ + +#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_INTERNALS_H_ */ + Modified: trunk/tests/format-tests/check_time.c ============================================================================== --- trunk/tests/format-tests/check_time.c Sat Mar 28 20:50:04 2009 (r5404) +++ trunk/tests/format-tests/check_time.c Sat Mar 28 20:58:10 2009 (r5405) @@ -9,6 +9,8 @@ #include "support.h" +#include "opensync/format/opensync_time_internals.h" + // this test assumes Eastern time, sorry. START_TEST (time_timezone_diff) { |