move my_localtime_r, my_gmtime_r to arch_setup

This commit is contained in:
Glenn Maynard
2004-02-14 08:22:30 +00:00
parent 10a4580c12
commit f564e94028
2 changed files with 29 additions and 0 deletions
@@ -0,0 +1,22 @@
#include "global.h"
#include "arch_setup.h"
#include "RageThreads.h"
#include <time.h>
struct tm *my_localtime_r( const time_t *timep, struct tm *result )
{
static RageMutex mut;
LockMut(mut);
*result = *localtime( timep );
return result;
}
struct tm *my_gmtime_r( const time_t *timep, struct tm *result )
{
static RageMutex mut;
LockMut(mut);
*result = *gmtime( timep );
return result;
}
@@ -22,6 +22,13 @@
/* mkdir is missing the mode arg */
#define mkdir(p,m) mkdir(p)
typedef time_t time_t;
struct tm;
struct tm *my_localtime_r( const time_t *timep, struct tm *result );
#define localtime_r my_localtime_r
struct tm *my_gmtime_r( const time_t *timep, struct tm *result );
#define gmtime_r my_gmtime_r
/* Missing stdint types: */
typedef __int64 int64_t;
typedef unsigned __int64 uint64_t;