POSIX.2 utilities must call setlocale(LC_ALL, "");
This commit is contained in:
parent
b4780b53b4
commit
52a3f39615
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $ */
|
||||
/* $NetBSD: chmod.c,v 1.13 1997/06/26 23:21:33 kleink Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993, 1994
|
||||
|
@ -43,7 +43,7 @@ static char copyright[] =
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)chmod.c 8.8 (Berkeley) 4/1/94";
|
||||
#else
|
||||
static char rcsid[] = "$NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $";
|
||||
static char rcsid[] = "$NetBSD: chmod.c,v 1.13 1997/06/26 23:21:33 kleink Exp $";
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -53,6 +53,7 @@ static char rcsid[] = "$NetBSD: chmod.c,v 1.12 1995/03/21 09:02:09 cgd Exp $";
|
|||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fts.h>
|
||||
#include <locale.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -74,6 +75,8 @@ main(argc, argv)
|
|||
int Hflag, Lflag, Pflag, Rflag, ch, fflag, fts_options, hflag, rval;
|
||||
char *ep, *mode;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
Hflag = Lflag = Pflag = Rflag = fflag = hflag = 0;
|
||||
while ((ch = getopt(argc, argv, "HLPRXfgorstuwx")) != -1)
|
||||
switch (ch) {
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: cksum.c,v 1.8 1997/01/30 01:10:34 thorpej Exp $ */
|
||||
/* $NetBSD: cksum.c,v 1.9 1997/06/26 23:24:01 kleink Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997 Jason R. Thorpe. All rights reserved.
|
||||
|
@ -47,7 +47,7 @@ static char copyright[] =
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)cksum.c 8.2 (Berkeley) 4/28/95";
|
||||
#endif
|
||||
static char rcsid[] = "$NetBSD: cksum.c,v 1.8 1997/01/30 01:10:34 thorpej Exp $";
|
||||
static char rcsid[] = "$NetBSD: cksum.c,v 1.9 1997/06/26 23:24:01 kleink Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
|
@ -56,6 +56,7 @@ static char rcsid[] = "$NetBSD: cksum.c,v 1.8 1997/01/30 01:10:34 thorpej Exp $"
|
|||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <locale.h>
|
||||
#include <md5.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
@ -82,6 +83,8 @@ main(argc, argv)
|
|||
|
||||
dosum = domd5 = pflag = nomd5stdin = 0;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
if (!strcmp(__progname, "md5"))
|
||||
domd5 = 1;
|
||||
else if (!strcmp(__progname, "sum")) {
|
||||
|
|
|
@ -39,7 +39,7 @@ static char copyright[] =
|
|||
|
||||
#ifndef lint
|
||||
/* from: static char sccsid[] = "@(#)chown.c 8.8 (Berkeley) 4/4/94"; */
|
||||
static char *rcsid = "$NetBSD: chown.c,v 1.9 1997/05/02 01:36:18 jtc Exp $";
|
||||
static char *rcsid = "$NetBSD: chown.c,v 1.10 1997/06/26 23:18:05 kleink Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <sys/param.h>
|
||||
|
@ -49,6 +49,7 @@ static char *rcsid = "$NetBSD: chown.c,v 1.9 1997/05/02 01:36:18 jtc Exp $";
|
|||
#include <dirent.h>
|
||||
#include <err.h>
|
||||
#include <errno.h>
|
||||
#include <locale.h>
|
||||
#include <fts.h>
|
||||
#include <grp.h>
|
||||
#include <pwd.h>
|
||||
|
@ -78,6 +79,8 @@ main(argc, argv)
|
|||
int Hflag, Lflag, Pflag, ch, fts_options, hflag, rval;
|
||||
char *cp;
|
||||
|
||||
setlocale(LC_ALL, "");
|
||||
|
||||
myname = (cp = strrchr(*argv, '/')) ? cp + 1 : *argv;
|
||||
ischown = myname[2] == 'o';
|
||||
|
||||
|
|
Loading…
Reference in New Issue