Skip to content

Commit

Permalink
Remove support for setting the date
Browse files Browse the repository at this point in the history
This wasn't really being used and was too much trouble to port.
* Makefile, NEWS: Document this.
* date.c: Don't include utmpx.h or fcntl.h..
(OTIME_MSG, NTIME_MSG, WTMPX_FILE): Remove.
(main, usage): Remove support for setting the date.
Remove dummy -n option.
(reset, wildinput, oops, sametm, convert, checkfinal, iffy): Remove.
  • Loading branch information
eggert committed Jul 29, 2015
1 parent 7273c9e commit 99a2b9d
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 412 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ LDLIBS=
# -DHAVE_SYS_WAIT_H=0 if your compiler lacks a "sys/wait.h"
# -DHAVE_TZSET=0 if your system lacks a tzset function
# -DHAVE_UNISTD_H=0 if your compiler lacks a "unistd.h" (Microsoft C++ 7?)
# -DHAVE_UTMPX_H=0 if your compiler lacks a "utmpx.h"
# -DNO_RUN_TIME_WARNINGS_ABOUT_YEAR_2000_PROBLEMS_THANK_YOU=1
# if you do not want run time warnings about formats that may cause
# year 2000 grief
Expand Down
21 changes: 4 additions & 17 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -48,23 +48,10 @@ Unreleased, experimental changes
Some Visual Studio 2013 warnings have been suppressed.
(Thanks to Kees Dekker.)

date now sets the time of day via the POSIX clock_settime function
instead of via the older nonstandard settimeofday function.
date's -a, -d, and -t options have been removed. Long obsolescent,
they were usable only by the superuser, and their implementation
had porting problems. Builders no longer need to configure
HAVE_ADJTIME and HAVE_SETTIMEOFDAY. (Thanks to Kees Dekker for
pointing out the problem.)

The implementation of date's -n option, which has long been a
no-op in practice, has been greatly simplified and the -n option
is no longer documented. (Thanks to Kees Dekker for pointing out
the problem.)

For recording clock changes date.c by default now includes and
uses <utmpx.h>, which has long been part of POSIX, and no longer
uses the long-obsolescent <utmp.h> API. Compile with
-DHAVE_UTMPX_H=0 to suppress the use of <utmpx.h>.
'date' no longer sets the time of day and its -a, -d, -n and -t
options have been removed. Long obsolescent, the implementation
of these features had porting problems. Builders no longer need
to configure HAVE_ADJTIME, HAVE_SETTIMEOFDAY, or HAVE_UTMPX_H.
(Thanks to Kees Dekker for pointing out the problem.)

Changes affecting documentation
Expand Down
Loading

0 comments on commit 99a2b9d

Please sign in to comment.