diff options
author | Manuel Novoa III <mjn3@codepoet.org> | 2004-01-14 06:30:59 +0000 |
---|---|---|
committer | Manuel Novoa III <mjn3@codepoet.org> | 2004-01-14 06:30:59 +0000 |
commit | 5dd9f2af4bcc23c86d1d4f4a5574c20d7faff949 (patch) | |
tree | b22b7b76a84af013f171fdcf00f8937408bbbc7e /libc/misc | |
parent | cc9a9ed87bd5b700c81ae999358e2b063592b393 (diff) |
Add a dummy (always fails) wcsftime. This is needed for the libstdc++ locale
implementation to build. Later this month I'll add a functional wcsftime.
Diffstat (limited to 'libc/misc')
-rw-r--r-- | libc/misc/time/Makefile | 4 | ||||
-rw-r--r-- | libc/misc/time/time.c | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/libc/misc/time/Makefile b/libc/misc/time/Makefile index b47a97c33..1ed212cf0 100644 --- a/libc/misc/time/Makefile +++ b/libc/misc/time/Makefile @@ -38,6 +38,10 @@ ifeq ($(UCLIBC_HAS_XLOCALE),y) endif ifeq ($(UCLIBC_HAS_WCHAR),y) + MOBJ += wcsftime.o +ifeq ($(UCLIBC_HAS_XLOCALE),y) + MOBJx += wcsftime_l.o +endif endif CSRC= adjtime.c ftime.c clock_gettime.c diff --git a/libc/misc/time/time.c b/libc/misc/time/time.c index c37874e28..e2f1f6c6d 100644 --- a/libc/misc/time/time.c +++ b/libc/misc/time/time.c @@ -2212,6 +2212,38 @@ time_t _time_mktime(struct tm *timeptr, int store_on_success) #endif /**********************************************************************/ +#if defined(L_wcsftime) || defined(L_wcsftime_l) + +#if defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) + +extern size_t __wcsftime_l (wchar_t *__restrict __s, size_t __maxsize, + __const wchar_t *__restrict __format, + __const struct tm *__restrict __timeptr, + __locale_t __loc) __THROW; + +size_t wcsftime(wchar_t *__restrict s, size_t maxsize, + const wchar_t *__restrict format, + const struct tm *__restrict timeptr) +{ + return __wcsftime_l(s, maxsize, format, timeptr, __UCLIBC_CURLOCALE); +} + +#else /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ + +size_t __XL(wcsftime)(wchar_t *__restrict s, size_t maxsize, + const wchar_t *__restrict format, + const struct tm *__restrict timeptr __LOCALE_PARAM ) +{ +#warning wcsftime always fails + return 0; /* always fail */ +} + +__XL_ALIAS(wcsftime) + +#endif /* defined(__UCLIBC_HAS_XLOCALE__) && !defined(__UCLIBC_DO_XLOCALE) */ + +#endif +/**********************************************************************/ #ifdef L_dysize /* Return the number of days in YEAR. */ |