lobase

Linux port of OpenBSDs userland.
Log | Files | Refs | README

commit b0fd4d8c8d8fbe5595978cc62b1103aebc8656e1
parent d3de4983746a6bcde1f87fd97fcc51c9915d39c8
Author: Duncaen <mail@duncano.de>
Date:   Wed, 24 May 2017 02:53:13 +0200

bin/date: update to OPENBSD_6_1

Diffstat:
bin/date/date.1 | 6+++---
bin/date/date.c | 12+++++-------
2 files changed, 8 insertions(+), 10 deletions(-)

diff --git a/bin/date/date.1 b/bin/date/date.1 @@ -1,4 +1,4 @@ -.\" $OpenBSD: date.1,v 1.66 2015/09/25 16:02:54 schwarze Exp $ +.\" $OpenBSD: date.1,v 1.67 2016/09/12 17:28:47 jca Exp $ .\" $NetBSD: date.1,v 1.12 1996/03/12 04:32:37 phil Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 @@ -33,7 +33,7 @@ .\" .\" @(#)date.1 8.3 (Berkeley) 4/28/95 .\" -.Dd $Mdocdate: September 25 2015 $ +.Dd $Mdocdate: September 12 2016 $ .Dt DATE 1 .Os .Sh NAME @@ -76,7 +76,7 @@ The options are as follows: Use the .Xr adjtime 2 call to gradually skew the local time to the -remote time rather than just hopping. +desired time rather than just hopping. .It Fl d Ar dst Set the system's value for Daylight Saving Time. If diff --git a/bin/date/date.c b/bin/date/date.c @@ -1,4 +1,4 @@ -/* $OpenBSD: date.c,v 1.49 2015/10/09 01:37:06 deraadt Exp $ */ +/* $OpenBSD: date.c,v 1.50 2016/10/19 18:20:25 schwarze Exp $ */ /* $NetBSD: date.c,v 1.11 1995/09/07 06:21:05 jtc Exp $ */ /* @@ -39,10 +39,10 @@ #include <stdio.h> #include <stdlib.h> #include <string.h> -#include <locale.h> #include <syslog.h> #include <time.h> #include <unistd.h> +#include <util.h> extern char *__progname; @@ -52,7 +52,7 @@ int slidetime; static void setthetime(char *); static void badformat(void); -static void usage(void); +static void __dead usage(void); int main(int argc, char *argv[]) @@ -63,8 +63,6 @@ main(int argc, char *argv[]) int ch, rflag; char *format, buf[1024], *outzone = NULL; - setlocale(LC_ALL, ""); - tz.tz_dsttime = tz.tz_minuteswest = 0; rflag = 0; while ((ch = getopt(argc, argv, "ad:jr:ut:z:")) != -1) @@ -145,7 +143,7 @@ main(int argc, char *argv[]) errx(1, "conversion error"); (void)strftime(buf, sizeof(buf), format, tp); (void)printf("%s\n", buf); - exit(0); + return 0; } #define ATOI2(ar) ((ar) += 2, ((ar)[-2] - '0') * 10 + ((ar)[-1] - '0')) @@ -265,7 +263,7 @@ badformat(void) usage(); } -static void +static void __dead usage(void) { (void)fprintf(stderr,