summaryrefslogtreecommitdiff
path: root/libc/misc/time
diff options
context:
space:
mode:
authorManuel Novoa III <mjn3@codepoet.org>2002-11-22 03:05:27 +0000
committerManuel Novoa III <mjn3@codepoet.org>2002-11-22 03:05:27 +0000
commitc386ddb4d8a1b076d94ebe8b85ca5d0dd124892b (patch)
treee30c9d77393721491f4a3a42e223980352b72ff8 /libc/misc/time
parent2b8a8dc7144328f301390f13fa560d29a410e34f (diff)
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.
Diffstat (limited to 'libc/misc/time')
-rw-r--r--libc/misc/time/time.c7
1 files changed, 7 insertions, 0 deletions
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));
}