forked from enlightenment/efl
* NEWS:
* 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:
parent
8be32105cb
commit
2aeedca6c1
|
@ -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>
|
2012-03-30 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* NEWS:
|
* NEWS:
|
||||||
|
|
|
@ -5,6 +5,7 @@ Evil NEWS - User visible changes.
|
||||||
** Add evil_path_is_absolute() API
|
** Add evil_path_is_absolute() API
|
||||||
** Add POSIX printf() family functions
|
** Add POSIX printf() family functions
|
||||||
** Add S_ISLNK macro
|
** Add S_ISLNK macro
|
||||||
|
** Do not declare and define localtime_r() if it's already defined
|
||||||
|
|
||||||
* Evil 1.0:
|
* Evil 1.0:
|
||||||
|
|
||||||
|
|
|
@ -5,32 +5,35 @@
|
||||||
#include "Evil.h"
|
#include "Evil.h"
|
||||||
#include "evil_private.h"
|
#include "evil_private.h"
|
||||||
|
|
||||||
|
#ifndef localtime_r
|
||||||
|
|
||||||
struct tm *
|
struct tm *
|
||||||
localtime_r(const time_t *timep, struct tm *result)
|
localtime_r(const time_t *timep, struct tm *result)
|
||||||
{
|
{
|
||||||
#ifndef _MSC_VER
|
# ifndef _MSC_VER
|
||||||
struct tm *tmp;
|
struct tm *tmp;
|
||||||
#endif /* ! _MSC_VER */
|
# endif /* ! _MSC_VER */
|
||||||
|
|
||||||
if (!timep || !result)
|
if (!timep || !result)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
# ifdef _MSC_VER
|
||||||
if (localtime_s(result, timep) != 0)
|
if (localtime_s(result, timep) != 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
#else
|
# else
|
||||||
tmp = localtime(timep);
|
tmp = localtime(timep);
|
||||||
if (!tmp)
|
if (!tmp)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
memcpy(result, tmp, sizeof(struct tm));
|
memcpy(result, tmp, sizeof(struct tm));
|
||||||
|
|
||||||
#endif /* ! _MSC_VER */
|
# endif /* ! _MSC_VER */
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* localtime_r */
|
||||||
|
|
||||||
#ifdef UNDER_CE
|
#ifdef UNDER_CE
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -13,6 +13,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef localtime_r
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Convert the calendar time to broken-time representation in a
|
* @brief Convert the calendar time to broken-time representation in a
|
||||||
* user supplied data.
|
* user supplied data.
|
||||||
|
@ -33,6 +35,8 @@
|
||||||
*/
|
*/
|
||||||
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
|
EAPI struct tm *localtime_r(const time_t *timep, struct tm *result);
|
||||||
|
|
||||||
|
#endif /* localtime_r */
|
||||||
|
|
||||||
#ifdef UNDER_CE
|
#ifdef UNDER_CE
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue