diff options
author | 2020-02-11 12:42:01 +0000 | |
---|---|---|
committer | 2020-02-11 12:42:01 +0000 | |
commit | 1ac45bc3dd80a11e6bfd6e453d36623ed09360c2 (patch) | |
tree | 49257269241467e36531c1acf67e62672fd8fbf5 | |
parent | Remove unused variables from Ben Boeckel, and a Pp from jmc. (diff) | |
download | wireguard-openbsd-1ac45bc3dd80a11e6bfd6e453d36623ed09360c2.tar.xz wireguard-openbsd-1ac45bc3dd80a11e6bfd6e453d36623ed09360c2.zip |
Remove setlocale(3) calls. I checked that no functions are called that
are actually locale-dependent on OpenBSD, and the programs should better
not be locale-dependent even when compiled on other systems.
millert@ points out that the month and weekday names in the fourth and
fifth columns of crontab(5) could in theory be made locale-dependent,
but we certainly don't want that, and currently, they are only compared
against static const char * arrays in entry.c containing English names.
Patch sent in by Jan Stary <hans at stare dot cz>.
OK millert@
-rw-r--r-- | usr.sbin/cron/cron.c | 5 | ||||
-rw-r--r-- | usr.sbin/cron/crontab.c | 4 |
2 files changed, 2 insertions, 7 deletions
diff --git a/usr.sbin/cron/cron.c b/usr.sbin/cron/cron.c index 8fa4f8e97b6..69952932812 100644 --- a/usr.sbin/cron/cron.c +++ b/usr.sbin/cron/cron.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cron.c,v 1.77 2017/10/23 15:15:22 jca Exp $ */ +/* $OpenBSD: cron.c,v 1.78 2020/02/11 12:42:01 schwarze Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -28,7 +28,6 @@ #include <err.h> #include <errno.h> #include <grp.h> -#include <locale.h> #include <poll.h> #include <signal.h> #include <stdio.h> @@ -84,8 +83,6 @@ main(int argc, char *argv[]) sigset_t blocked, omask; struct group *grp; - setlocale(LC_ALL, ""); - setvbuf(stdout, NULL, _IOLBF, 0); setvbuf(stderr, NULL, _IOLBF, 0); diff --git a/usr.sbin/cron/crontab.c b/usr.sbin/cron/crontab.c index 6e9933af6cc..9e352f8f41e 100644 --- a/usr.sbin/cron/crontab.c +++ b/usr.sbin/cron/crontab.c @@ -1,4 +1,4 @@ -/* $OpenBSD: crontab.c,v 1.93 2019/06/28 13:32:47 deraadt Exp $ */ +/* $OpenBSD: crontab.c,v 1.94 2020/02/11 12:42:02 schwarze Exp $ */ /* Copyright 1988,1990,1993,1994 by Paul Vixie * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") @@ -26,7 +26,6 @@ #include <err.h> #include <errno.h> #include <limits.h> -#include <locale.h> #include <pwd.h> #include <signal.h> #include <stdio.h> @@ -92,7 +91,6 @@ main(int argc, char *argv[]) user_gid = getgid(); crontab_gid = getegid(); - setlocale(LC_ALL, ""); openlog(__progname, LOG_PID, LOG_CRON); setvbuf(stderr, NULL, _IOLBF, 0); |