mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
b=490037; export localtime_r/gmtime_r from CE shunt; r=dougt
This commit is contained in:
parent
58c5594f79
commit
83135751fd
@ -143,7 +143,17 @@ int _unlink(const char *filename );
|
||||
clock_t clock()
|
||||
|
||||
*/
|
||||
|
||||
|
||||
struct tm;
|
||||
|
||||
#ifndef _TIME_T_DEFINED
|
||||
typedef long time_t;
|
||||
#define _TIME_T_DEFINED
|
||||
#endif
|
||||
|
||||
struct tm* gmtime_r(const time_t* inTimeT, struct tm* outRetval);
|
||||
struct tm* localtime_r(const time_t* inTimeT, struct tm* outRetval);
|
||||
|
||||
/* Locale Stuff */
|
||||
|
||||
/* The locale stuff should be defined here, but it can't be because it
|
||||
|
@ -80,7 +80,7 @@ size_t strftime(char *, size_t, const char *, const struct tm *)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct tm* mozce_gmtime_r(const time_t* inTimeT, struct tm* outRetval)
|
||||
struct tm* gmtime_r(const time_t* inTimeT, struct tm* outRetval)
|
||||
{
|
||||
struct tm* retval = NULL;
|
||||
|
||||
@ -115,7 +115,7 @@ static struct tm* mozce_gmtime_r(const time_t* inTimeT, struct tm* outRetval)
|
||||
return retval;
|
||||
}
|
||||
|
||||
static struct tm* mozce_localtime_r(const time_t* inTimeT,struct tm* outRetval)
|
||||
struct tm* localtime_r(const time_t* inTimeT,struct tm* outRetval)
|
||||
{
|
||||
struct tm* retval = NULL;
|
||||
|
||||
@ -153,12 +153,12 @@ static struct tm* mozce_localtime_r(const time_t* inTimeT,struct tm* outRetval)
|
||||
|
||||
struct tm* localtime(const time_t* inTimeT)
|
||||
{
|
||||
return mozce_localtime_r(inTimeT, &tmStorage);
|
||||
return localtime_r(inTimeT, &tmStorage);
|
||||
}
|
||||
|
||||
struct tm* gmtime(const time_t* inTimeT)
|
||||
{
|
||||
return mozce_gmtime_r(inTimeT, &tmStorage);
|
||||
return gmtime_r(inTimeT, &tmStorage);
|
||||
}
|
||||
|
||||
|
||||
@ -191,7 +191,7 @@ time_t mktime(struct tm* inTM)
|
||||
/*
|
||||
* Now overwrite the struct passed in with what we believe it should be.
|
||||
*/
|
||||
gmTime = mozce_gmtime_r(&retval, inTM);
|
||||
gmTime = gmtime_r(&retval, inTM);
|
||||
}
|
||||
return retval;
|
||||
}
|
||||
|
@ -2110,6 +2110,7 @@ case "$target" in
|
||||
AC_DEFINE(STDC_HEADERS)
|
||||
AC_DEFINE(NEW_H, <new>)
|
||||
AC_DEFINE(WIN32_LEAN_AND_MEAN)
|
||||
AC_DEFINE(HAVE_LOCALTIME_R)
|
||||
|
||||
TARGET_MD_ARCH=win32
|
||||
_PLATFORM_DEFAULT_TOOLKIT='windows'
|
||||
|
Loading…
x
Reference in New Issue
Block a user