|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#ifndef AVUTIL_TIME_INTERNAL_H |
|
#define AVUTIL_TIME_INTERNAL_H |
|
|
|
#include <time.h> |
|
#include "config.h" |
|
|
|
#if !HAVE_GMTIME_R && !defined(gmtime_r) |
|
static inline struct tm *ff_gmtime_r(const time_t* clock, struct tm *result) |
|
{ |
|
struct tm *ptr = gmtime(clock); |
|
if (!ptr) |
|
return NULL; |
|
*result = *ptr; |
|
return result; |
|
} |
|
#define gmtime_r ff_gmtime_r |
|
#endif |
|
|
|
#if !HAVE_LOCALTIME_R && !defined(localtime_r) |
|
static inline struct tm *ff_localtime_r(const time_t* clock, struct tm *result) |
|
{ |
|
struct tm *ptr = localtime(clock); |
|
if (!ptr) |
|
return NULL; |
|
*result = *ptr; |
|
return result; |
|
} |
|
#define localtime_r ff_localtime_r |
|
#endif |
|
|
|
#endif |
|
|