b=490037; export localtime_r/gmtime_r from CE shunt; r=dougt
--- a/build/wince/shunt/include/mozce_shunt.h
+++ b/build/wince/shunt/include/mozce_shunt.h
@@ -138,17 +138,27 @@ int _unlink(const char *filename );
struct tm* localtime(const time_t* inTimeT)
struct tm* mozce_gmtime_r(const time_t* inTimeT, struct tm* outRetval)
struct tm* gmtime(const time_t* inTimeT)
time_t mktime(struct tm* inTM)
time_t time(time_t *)
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
is already defined in locale.h.
struct lconv * localeconv(void)
*/
--- a/build/wince/shunt/time.cpp
+++ b/build/wince/shunt/time.cpp
@@ -75,17 +75,17 @@ static const int sDaysOfYear[12] = {
};
static struct tm tmStorage;
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;
if(NULL != inTimeT) {
SYSTEMTIME winGMTime;
time_t_2_SYSTEMTIME(winGMTime, *inTimeT);
@@ -110,17 +110,17 @@ static struct tm* mozce_gmtime_r(const t
}
}
}
retval = 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;
if(NULL != inTimeT && NULL != outRetval) {
SYSTEMTIME winLocalTime;
time_t_2_LOCALSYSTEMTIME(winLocalTime, *inTimeT);
@@ -148,22 +148,22 @@ static struct tm* mozce_localtime_r(cons
retval = outRetval;
}
return retval;
}
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);
}
time_t mktime(struct tm* inTM)
{
time_t retval = (time_t)-1;
if(NULL != inTM) {
@@ -186,17 +186,17 @@ time_t mktime(struct tm* inTM)
/*
* First get our time_t.
*/
SYSTEMTIME_2_time_t(retval, winTime);
/*
* 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;
}
time_t time(time_t *)
{
time_t retval;
SYSTEMTIME winTime;
--- a/configure.in
+++ b/configure.in
@@ -2105,16 +2105,17 @@ case "$target" in
AC_DEFINE(_WIN32)
AC_DEFINE(WIN32)
AC_DEFINE(XP_WIN)
AC_DEFINE(XP_WIN32)
AC_DEFINE(HW_THREADS)
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'
BIN_SUFFIX='.exe'
USE_SHORT_LIBNAME=1
MOZ_ENABLE_POSTSCRIPT=
MOZ_USER_DIR="Mozilla"