summaryrefslogtreecommitdiffstats
path: root/eBones
diff options
context:
space:
mode:
authorache <ache@FreeBSD.org>1996-05-07 19:05:10 +0000
committerache <ache@FreeBSD.org>1996-05-07 19:05:10 +0000
commit573902ba603cc2ec0c40f1435138579e562f420c (patch)
treeeb9e09171cadc37425b40f005d43ae311da8e023 /eBones
parente816a9ae5f0591a445324a2aef2e1f689619a71b (diff)
downloadFreeBSD-src-573902ba603cc2ec0c40f1435138579e562f420c.zip
FreeBSD-src-573902ba603cc2ec0c40f1435138579e562f420c.tar.gz
Localize time
Diffstat (limited to 'eBones')
-rw-r--r--eBones/libexec/telnetd/utility.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/eBones/libexec/telnetd/utility.c b/eBones/libexec/telnetd/utility.c
index 049fcd1..e2f285a 100644
--- a/eBones/libexec/telnetd/utility.c
+++ b/eBones/libexec/telnetd/utility.c
@@ -35,6 +35,9 @@
static char sccsid[] = "@(#)utility.c 8.4 (Berkeley) 5/30/95";
#endif /* not lint */
+#ifdef __FreeBSD__
+#include <locale.h>
+#endif
#define PRINTOPTIONS
#include "telnetd.h"
@@ -433,12 +436,16 @@ putchr(cc)
*putlocation++ = cc;
}
+#ifdef __FreeBSD__
+static char fmtstr[] = { "%+" };
+#else
/*
* This is split on two lines so that SCCS will not see the M
* between two % signs and expand it...
*/
static char fmtstr[] = { "%l:%M\
%P on %A, %d %B %Y" };
+#endif
void
putf(cp, where)
@@ -481,6 +488,9 @@ putf(cp, where)
break;
case 'd':
+#ifdef __FreeBSD__
+ setlocale(LC_TIME, "");
+#endif
(void)time(&t);
(void)strftime(db, sizeof(db), fmtstr, localtime(&t));
putstr(db);
OpenPOWER on IntegriCloud