Use setlocale(3) to activate support for international characters.

This should fix PR bin/11007 by Bill Sommerfeld.
This commit is contained in:
tron 2000-09-13 21:20:21 +00:00
parent 47d6ee388a
commit 20084585ac
1 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: syslogd.c,v 1.40 2000/09/13 15:46:32 sommerfeld Exp $ */
/* $NetBSD: syslogd.c,v 1.41 2000/09/13 21:20:21 tron Exp $ */
/*
* Copyright (c) 1983, 1988, 1993, 1994
@ -43,7 +43,7 @@ __COPYRIGHT("@(#) Copyright (c) 1983, 1988, 1993, 1994\n\
#if 0
static char sccsid[] = "@(#)syslogd.c 8.3 (Berkeley) 4/4/94";
#else
__RCSID("$NetBSD: syslogd.c,v 1.40 2000/09/13 15:46:32 sommerfeld Exp $");
__RCSID("$NetBSD: syslogd.c,v 1.41 2000/09/13 21:20:21 tron Exp $");
#endif
#endif /* not lint */
@ -96,6 +96,7 @@ __RCSID("$NetBSD: syslogd.c,v 1.40 2000/09/13 15:46:32 sommerfeld Exp $");
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <locale.h>
#include <setjmp.h>
#include <signal.h>
#include <stdio.h>
@ -228,6 +229,8 @@ main(argc, argv)
char *p, *line, **pp;
struct pollfd *readfds;
(void)setlocale(LC_ALL, "");
while ((ch = getopt(argc, argv, "dsf:m:p:P:")) != -1)
switch(ch) {
case 'd': /* debug */