[uClibc-cvs] uClibc/libc/misc/time Makefile, 1.35, 1.36 time.c, 1.19, 1.20
Manuel Novoa III
mjn3 at uclibc.org
Wed Jan 14 06:31:01 UTC 2004
Update of /var/cvs/uClibc/libc/misc/time
In directory nail:/tmp/cvs-serv22814/libc/misc/time
Modified Files:
Makefile time.c
Log Message:
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.
Index: time.c
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/time/time.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- time.c 27 Dec 2003 23:30:34 -0000 1.19
+++ time.c 14 Jan 2004 06:30:59 -0000 1.20
@@ -2212,6 +2212,38 @@
#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. */
Index: Makefile
===================================================================
RCS file: /var/cvs/uClibc/libc/misc/time/Makefile,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- Makefile 7 Nov 2003 06:08:27 -0000 1.35
+++ Makefile 14 Jan 2004 06:30:58 -0000 1.36
@@ -38,6 +38,10 @@
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
More information about the uClibc-cvs
mailing list