#ifdef __cplusplus
extern "C" {
#endif

char *safe_ctime(const time_t *clock, char *bf);
char *safe_asctime(const struct tm *t, char *bf);
struct tm *safe_localtime_real(const time_t *clock,struct tm *result, int line);
struct tm *safe_gmtime(const time_t *clock,struct tm *result);
#ifndef WIN32
#include <sys/types.h>
#include <dirent.h>

int safe_readdir(DIR *dirp, char *dresult, struct dirent **result);
#endif

#define safe_localtime(a,b) safe_localtime_real(a,b,__LINE__)
#define ctime use_safe_ctime
#define localtime use_safe_localtime
#define asctime use_safe_asctime
#define readdir use_safe_readdir
#define gmtime use_safe_gmtime

#ifdef __cplusplus
}
#endif

