From c386ddb4d8a1b076d94ebe8b85ca5d0dd124892b Mon Sep 17 00:00:00 2001 From: Manuel Novoa III Date: Fri, 22 Nov 2002 03:05:27 +0000 Subject: Ok... here's the summary: Hopefully locale support will build when cross compiling now. Collation is still not supported, but that's what I'm currently working on. In the next couple of days, I'll probably put up a couple of files for download that will save people the trouble of generating all the glibc locales. Added *wprintf functions, although they currently don't support floating point. That will be fixed when I rewrite _dtostr... or possibly before. Added the wcsto{inttype} functions. Added iconv() and a mini iconv utility. The require locale support and only provide for conversions involving the various unicode encodings { UCS-4*, UCS-2*, UTF-32*, UTF-16*, UTF-8 }, the 8-bit codesets built with the locale data, and the internal WCHAR_T. --- libc/misc/time/time.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'libc/misc/time') diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index 378854adc..838a3a025 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -90,6 +90,9 @@ * Defining __TIME_TZ_OPT_SPEED will cause a tzset() to keep a copy of the * last TZ setting string and do a "fast out" if the current string is the * same. + * + * Nov 21, 2002 Fix an error return case in _time_mktime. + * */ @@ -2022,6 +2025,10 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success) localtime_r(&t, (struct tm *)p); + if (t < 0) { + return -1; + } + if (store_on_success) { memcpy(timeptr, p, sizeof(struct tm)); } -- cgit v1.2.3