* time/time.h (__strftime_l, strftime_l): Declare them.
* wcsmbs/wchar.h (__wcsftime_l, wcsftime_l): Declare them.
* time/strftime_l.c: New file.
* time/wcsftime_l.c: New file.
* time/Makefile (routines): Add strftime_l, wcsftime_l.
* time/Versions (libc: GLIBC_2.3): Add __strftime_l, __wcsftime_l,
strftime_l, wcsftime_l.
2002-08-27 Roland McGrath <roland@redhat.com>
+ * time/time.h (__strptime_l, strptime_l): Declare them.
+
+ * time/time.h (__strftime_l, strftime_l): Declare them.
+ * wcsmbs/wchar.h (__wcsftime_l, wcsftime_l): Declare them.
+ * time/strftime_l.c: New file.
+ * time/wcsftime_l.c: New file.
+ * time/Makefile (routines): Add strftime_l, wcsftime_l.
+ * time/Versions (libc: GLIBC_2.3): Add __strftime_l, __wcsftime_l,
+ strftime_l, wcsftime_l.
+
* locale/Versions (libc: GLIBC_PRIVATE): Move __uselocale to ...
(libc: GLIBC_2.3): ... here.
-# Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+# Copyright (C) 1991-1999,2000,01,02 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
headers := time.h sys/time.h sys/timeb.h bits/time.h
routines := offtime asctime clock ctime ctime_r difftime \
- gmtime localtime mktime strftime time \
+ gmtime localtime mktime time \
gettimeofday settimeofday adjtime tzset \
tzfile getitimer setitimer \
stime dysize timegm ftime \
- strptime getdate wcsftime
-
+ strptime getdate \
+ strftime wcsftime strftime_l wcsftime_l
distribute := datemsk
tests := test_time clocktest tst-posixtz tst-strptime tst_wcsftime \
# w*
wcsftime;
}
+ GLIBC_2.3 {
+ # s*
+ strftime_l;
+ # w*
+ wcsftime_l;
+
+ # these internal names are used by libstdc++
+ __strftime_l; __wcsftime_l;
+ }
}
--- /dev/null
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include <strftime.c>
+
+weak_alias (__strftime_l, strftime_l)
-/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999,2000,01,02 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
__THROW;
# endif
+# ifdef __USE_GNU
+/* Similar to the two functions above but take the information from
+ the provided locale and not the global locale. */
+# include <xlocale.h>
+
+extern size_t __strftime_l (char *__restrict __s, size_t __maxsize,
+ __const char *__restrict __format,
+ __const struct tm *__restrict __tp,
+ __locale_t __loc) __THROW;
+extern size_t strftime_l (char *__restrict __s, size_t __maxsize,
+ __const char *__restrict __format,
+ __const struct tm *__restrict __tp,
+ __locale_t __loc) __THROW;
+
+extern char *__strptime_l (__const char *__restrict __s,
+ __const char *__restrict __fmt, struct tm *__tp,
+ __locale_t __loc) __THROW;
+extern char *strptime_l (__const char *__restrict __s,
+ __const char *__restrict __fmt, struct tm *__tp,
+ __locale_t __loc) __THROW;
+# endif
+
/* Return the `struct tm' representation of *TIMER
in Universal Coordinated Time (aka Greenwich Mean Time). */
struct tm *__restrict __resbufp) __THROW;
# endif
-
__END_DECLS
#endif /* <time.h> included. */
--- /dev/null
+/* Copyright (C) 2002 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#define USE_IN_EXTENDED_LOCALE_MODEL 1
+#include <wcsftime.c>
+
+weak_alias (__wcsftime_l, wcsftime_l)
__const wchar_t *__restrict __format,
__const struct tm *__restrict __tp) __THROW;
+# ifdef __USE_GNU
+# include <xlocale.h>
+
+/* Similar to `wcsftime' but takes the information from
+ the provided locale and not the global locale. */
+extern size_t __wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
+ __const wchar_t *__restrict __format,
+ __const struct tm *__restrict __tp,
+ __locale_t __loc) __THROW;
+extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
+ __const wchar_t *__restrict __format,
+ __const struct tm *__restrict __tp,
+ __locale_t __loc) __THROW;
+# endif
+
/* The X/Open standard demands that most of the functions defined in
the <wctype.h> header must also appear here. This is probably
because some X/Open members wrote their implementation before the