summaryrefslogtreecommitdiff
path: root/lib/strftime.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2000-04-03 07:09:38 +0000
committerJim Meyering <jim@meyering.net>2000-04-03 07:09:38 +0000
commitdda6851673d45f5c8f989f2cfdf1e2dfc0df7407 (patch)
treeef63dfd3fa8c5c5c7d7db31254754d12a038a611 /lib/strftime.c
parent3feb52cde7558ef481861169578e70395d600e79 (diff)
downloadcoreutils-dda6851673d45f5c8f989f2cfdf1e2dfc0df7407.tar.xz
(my_strftime): Make sure we call the system
strftime, not ourselves, when invoking the underlying strftime.
Diffstat (limited to 'lib/strftime.c')
-rw-r--r--lib/strftime.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/strftime.c b/lib/strftime.c
index 95e55cba5..f3dcd77f4 100644
--- a/lib/strftime.c
+++ b/lib/strftime.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991,92,93,94,95,96,97,98,99 Free Software Foundation, Inc.
+/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
NOTE: The canonical source of this file is maintained with the GNU C Library.
Bugs can be reported to bug-glibc@prep.ai.mit.edu.
@@ -817,6 +817,13 @@ 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
+# endif
+
*u++ = '%';
if (modifier != 0)
*u++ = modifier;