summaryrefslogtreecommitdiffstats
path: root/usr.bin/touch/touch.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Delete a useless call to setlocale(3): strptime(3) is only calledschwarze2019-03-101-7/+4
| | | | | | | | | | | | | with %F and %T, neither of which is locale-dependent, and nothing else in the code depends on the locale either, since most of the parsing is done by hand and only supports numerical formats in the first place. While here, make usage() static and return from main rather than exit(3). Patch from Jan Stary <hans at stare dot cz>. tedu@ agrees.
* Change all tame callers to namechange to pledge(2).deraadt2015-10-091-3/+3
|
* use tame "stdio rpath wpath cpath fattr". There is some timezonederaadt2015-10-061-1/+4
| | | | | database stuff here which goes further than most programs, but the neccessary files are readable using "rpath".
* Eliminate use of TM_YEAR_BASE. OK guenther@ deraadt@ miod@millert2015-03-171-4/+4
|
* tzfile.h is an internal header that should never have been installed.millert2015-03-151-2/+1
| | | | | | | | | What's worse, the tzfile.h that gets installed is over 20 years old and doesn't match the real tzfile.h in libc/time. This makes the tree safe for /usr/include/tzfile.h removal. The TM_YEAR_BASE define has been moved to time.h temporarily until its usage is replaced by 1900 in the tree. Actual removal of tzfile.h is pending a ports build. Based on a diff from deraadt@
* use the same format/text, as far as possible, for date strings;jmc2011-08-311-3/+3
| | | | help/ok guenther millert
* Make the code match the manpage and POSIX spec when the year is specifiedguenther2011-08-301-5/+10
| | | | | | but the century isn't: century is 1900 if year >= 69; else 2000 ok millert@
* With gettimeofday() removed from the top of main(), need to call time()guenther2011-08-211-3/+3
| | | | | | | for the defaulting of the year to work in the -t and arg1 forms that were broken by previous change ok millert@
* Add nanosecond precision and support for -d option (new in POSIX 2008)guenther2011-08-201-69/+94
| | | | ok millert@, manpage fixes jmc@
* the ellipsis is not an optional argument; while here, sync the usagesobrado2007-08-061-2/+3
| | | | | | | | and synopsis of commands lots of good ideas by jmc@ ok jmc@
* Fix typo introduced in seconds parsing. From Tim van der Molen.millert2007-06-181-2/+2
|
* Sanity check time spec and if no century is specified, just use themillert2007-05-251-38/+58
| | | | current one.
* even bettererhenning2006-03-081-5/+5
| | | | From: Przemyslaw Nowaczyk <p_nowaczyk@o2.pl>
* KNF & cleanuphenning2006-03-071-31/+20
| | | | mostly From: Przemyslaw Nowaczyk <p_nowaczyk@o2.pl>
* spacingderaadt2005-04-201-5/+5
|
* Remove redundant rw() function, which is unsafe and, well, redundant.otto2005-04-201-60/+7
| | | | ok tedu@ deraadt@
* mostly ansi cleanup; pval okderaadt2003-06-101-20/+8
|
* Remove the advertising clause in the UCB license which Berkeleymillert2003-06-031-7/+3
| | | | rescinded 22 July 1999. Proofed by myself and Theo.
* typo in comment; Jim Geovedihenning2003-01-101-3/+3
|
* Part one of userland __P removal. Done with a simple regexp with some minor hand editing to make comments line up correctly. Another pass is forthcoming that handles the cases that could not be done automatically.millert2002-02-161-7/+7
|
* Missed one TM_YEAR_BASE in previous commit; pointed out by peters@telia.netpjanzen2000-10-131-5/+4
| | | | in PR 1445.
* use TM_YEAR_BASE and set seconds to zero in obsolescent "compatibility" case;pjanzen2000-09-201-8/+11
| | | | from NetBSD.
* Y2K fix for obsolescent time format: found by Camiel Dobbelaar.pjanzen2000-09-201-6/+10
|
* getopt(3) returns -1 when out of args, not EOF, whee!millert1997-01-151-3/+3
|
* rcsidderaadt1996-06-261-1/+2
|
* initial import of NetBSD treederaadt1995-10-181-0/+354