summaryrefslogtreecommitdiff
path: root/libexec/telnetd
diff options
context:
space:
mode:
authorAndrey A. Chernov <ache@FreeBSD.org>1996-05-07 19:10:32 +0000
committerAndrey A. Chernov <ache@FreeBSD.org>1996-05-07 19:10:32 +0000
commit03749d174faefba2c3fffd162fb03c4660c77139 (patch)
tree8a4a407e2ce2bc83042bbef94d27b8936da02daa /libexec/telnetd
parent45fa48fe14de46c359fa17ce714291756474f86d (diff)
Notes
Diffstat (limited to 'libexec/telnetd')
-rw-r--r--libexec/telnetd/utility.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libexec/telnetd/utility.c b/libexec/telnetd/utility.c
index 4f5c2e6fc0c5..03e1af2eaf39 100644
--- a/libexec/telnetd/utility.c
+++ b/libexec/telnetd/utility.c
@@ -35,6 +35,9 @@
static char sccsid[] = "@(#)utility.c 8.2 (Berkeley) 12/15/93";
#endif /* not lint */
+#ifdef __FreeBSD__
+#include <locale.h>
+#endif
#define PRINTOPTIONS
#include "telnetd.h"
@@ -399,12 +402,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)
@@ -447,6 +454,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);