diff --git a/build/wince/shunt/include/mozce_shunt.h b/build/wince/shunt/include/mozce_shunt.h index 86d9d6613790..c534150d7aa6 100644 --- a/build/wince/shunt/include/mozce_shunt.h +++ b/build/wince/shunt/include/mozce_shunt.h @@ -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 diff --git a/build/wince/shunt/time.cpp b/build/wince/shunt/time.cpp index 0d3b9426e205..f1423e856d80 100644 --- a/build/wince/shunt/time.cpp +++ b/build/wince/shunt/time.cpp @@ -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; } diff --git a/configure.in b/configure.in index 09b46be07b4c..33e8bfd122e3 100644 --- a/configure.in +++ b/configure.in @@ -2110,6 +2110,7 @@ case "$target" in AC_DEFINE(STDC_HEADERS) AC_DEFINE(NEW_H, ) AC_DEFINE(WIN32_LEAN_AND_MEAN) + AC_DEFINE(HAVE_LOCALTIME_R) TARGET_MD_ARCH=win32 _PLATFORM_DEFAULT_TOOLKIT='windows'