b=490037; export localtime_r/gmtime_r from CE shunt; r=dougt

This commit is contained in:
Vladimir Vukicevic 2009-04-24 12:55:12 -07:00
Родитель 58c5594f79
Коммит 83135751fd
3 изменённых файлов: 17 добавлений и 6 удалений

Просмотреть файл

@ -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'