* src/lib/evil_time.c:
	* src/lib/evil_time.h:
	Do not declare and define localtime_r() if it's already defined.



SVN revision: 70155
This commit is contained in:
Vincent Torri 2012-04-12 16:12:58 +00:00
parent 8be32105cb
commit 2aeedca6c1
4 changed files with 20 additions and 5 deletions

View File

@ -1,3 +1,10 @@
2012-04-12 Vincent Torri <doursse at users dot sf dot net>
* NEWS:
* src/lib/evil_time.c:
* src/lib/evil_time.h:
Do not declare and define localtime_r() if it's already defined.
2012-03-30 Vincent Torri <doursse at users dot sf dot net>
* NEWS:

View File

@ -5,6 +5,7 @@ Evil NEWS - User visible changes.
** Add evil_path_is_absolute() API
** Add POSIX printf() family functions
** Add S_ISLNK macro
** Do not declare and define localtime_r() if it's already defined
* Evil 1.0:

View File

@ -5,32 +5,35 @@
#include "Evil.h"
#include "evil_private.h"
#ifndef localtime_r
struct tm *
localtime_r(const time_t *timep, struct tm *result)
{
#ifndef _MSC_VER
# ifndef _MSC_VER
struct tm *tmp;
#endif /* ! _MSC_VER */
# endif /* ! _MSC_VER */
if (!timep || !result)
return NULL;
#ifdef _MSC_VER
# ifdef _MSC_VER
if (localtime_s(result, timep) != 0)
return NULL;
#else
# else
tmp = localtime(timep);
if (!tmp)
return NULL;
memcpy(result, tmp, sizeof(struct tm));
#endif /* ! _MSC_VER */
# endif /* ! _MSC_VER */
return result;
}
#endif /* localtime_r */
#ifdef UNDER_CE
void

View File

@ -13,6 +13,8 @@
*/
#ifndef localtime_r
/**
* @brief Convert the calendar time to broken-time representation in a
* user supplied data.
@ -33,6 +35,8 @@
*/
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
#endif /* localtime_r */
#ifdef UNDER_CE
/**