aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-08-30 18:31:38 +0000
committerUlrich Drepper <drepper@redhat.com>2000-08-30 18:31:38 +0000
commite668889af26990931a9103918a395ef2033fb846 (patch)
treef4a0666cbdb0e781d210f135eb35f1dce7b89577
parentdb7dc81100c128593c20083e3891fc05941729bf (diff)
downloadglibc-e668889af26990931a9103918a395ef2033fb846.tar
glibc-e668889af26990931a9103918a395ef2033fb846.tar.gz
glibc-e668889af26990931a9103918a395ef2033fb846.tar.bz2
glibc-e668889af26990931a9103918a395ef2033fb846.zip
Update.
* time/strftime.c (my_strftime): Add compatibility code for use outside glibc. Patch by Jim Meyering <meyering@ascend.com>.
-rw-r--r--ChangeLog3
-rw-r--r--time/strftime.c12
2 files changed, 15 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 1eee99e1d4..ee9efd6511 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2000-08-30 Ulrich Drepper <drepper@redhat.com>
+ * time/strftime.c (my_strftime): Add compatibility code for use
+ outside glibc. Patch by Jim Meyering <meyering@ascend.com>.
+
* sysdeps/posix/getaddrinfo.c (gaih_local): uname does not everywhere
return 0 for success but always < 0 on failure.
diff --git a/time/strftime.c b/time/strftime.c
index abda62b4a4..95dbae1850 100644
--- a/time/strftime.c
+++ b/time/strftime.c
@@ -83,6 +83,10 @@ extern char *tzname[];
# include <stddef.h>
# include <stdlib.h>
# include <string.h>
+#else
+# ifndef HAVE_MEMCPY
+# define memcpy(d, s, n) bcopy ((s), (d), (n))
+# endif
#endif
#ifdef COMPILE_WIDE
@@ -816,6 +820,14 @@ my_strftime (s, maxsize, format, tp ut_argument)
char *u = ufmt;
char ubuf[1024]; /* enough for any single format in practice */
size_t len;
+ /* Make sure we're calling the actual underlying strftime.
+ In some cases, config.h contains something like
+ "#define strftime rpl_strftime". */
+# ifdef strftime
+# undef strftime
+ size_t strftime ();
+# endif
+
*u++ = '%';
if (modifier != 0)
*u++ = modifier;