Age | Commit message (Collapse) | Author |
|
|
|
|
|
(touch): Use fd_safer.
|
|
|
|
(main): Gettime now returns void.
|
|
All uses rewritten.
(touch): Use new futimens function to operate more efficiently
in some cases. Don't stat/fstat existing file when
(!amtime_now && change_times == (CH_ATIME | CH_MTIME)); the
old time stamps aren't needed in that case.
(main): change_times is int, not bool. Simplify test for
change_times.
|
|
|
|
MMDDhhmm file" must be treated like "touch MMDDhhmm file" when
conforming to pre-2001 POSIX.
|
|
touch, main): Use bool for booleans.
(main): Avoid integer overflow when given more than INT_MAX
options.
|
|
too few operands ("missing operand after `xxx'") or
too many operands ("extra operand `xxx'").
Include "quote.h" and/or "error.h" if it wasn't already being included.
|
|
|
|
for access and one for modification.
(ref_stats): Remove.
(get_reldate): Use get_date's parameter profile.
(touch, main): Adjust to above changes.
(main): Work even if tm_year == INT_MAX (so long as long int is wider).
Use gettime instead of gettimeofday, for new get_date signature.
|
|
(err): Now a boolean int, not a counter,
so that we don't have to worry about int overflow. All uses changed.
|
|
(get_reldate): New function.
(main): Use it, to implement this new behavior.
|
|
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings.
Update the call to parse_long_options so that `AUTHORS, NULL' are the
last parameters.
* src/true.c (main): Append NULL to version_etc argument list.
* src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
|
|
Begin each WRITTEN_BY string with `Written by ' and end it with `.'.
Mark each WRITTEN_BY string as translatable.
|
|
|
|
the call to parse_long_options so that `AUTHORS, NULL' are the last parameters.
|
|
Set file timestamps with utimens, not utime.
|
|
|
|
Moved to system.h.
|
|
|
|
that it makes sense both when the file exists and when it doesn't.
|
|
|
|
|
|
`exit (1)' to `exit (EXIT_FAILURE)', and
`usage (1)' to `usage (EXIT_FAILURE)'.
|
|
|
|
Remove unnecessary initialization.
Use localtime, not posixtm, to warn about obsolete "touch".
|
|
|
|
when --no-create is in effect. Based on a patch from TAKAI Kousuke.
|
|
(usage): Document only the intersection of the old and new behaviors,
to encourage portability.
(main): Use `posix2_version ()' in place of POSIX2_VERSION.
|
|
|
|
support of the obsolete `touch [-acm] MMDDhhmm[YY] FILE...' syntax.
(usage, main): Implement this.
|
|
that they indicate a failure.
s/getting attributes/failed to get attributes/
|
|
instead of hard-coding --help and --version descriptions.
|
|
systems for which errno is set to EPERM in that case. Thus, e.g.,
`touch /' by non-root gives a better diagnostic on systems like SunOS4.
|
|
for short options too.''
|
|
Use fputs, not printf.
|
|
|
|
(touch): Give a better diagnostic for e.g., `touch /' by non-root.
Based on a patch from Michael Stone.
Reported by Jeff Sheinberg as Debian bug #101677.
|
|
help2man recognizes it as such.
|
|
digits as a file name, rather than as a date/time in the obsolescent
`MMDDhhmm[YY]' format. Reported by Wenjun Zheng.
|
|
|
|
corresponding argument in a `quote (...)' call.
Add more precise diagnostics.
|
|
|
|
(touch): Add O_NOCTTY to the flags passed to open.
|
|
(O_NONBLOCK): Define to O_NDELAY if not defined.
(touch): Open with O_NONBLOCK, so one can touch a fifo without hanging.
Reported by Eric G. Miller via Michael Stone.
|
|
(longopts): ...use it here instead of `CHAR_MAX + 1'.
(main): Likewise.
|
|
unwritable directory.
(touch): Record errno upon failed errno and use that
saved value if a subsequent fstat, stat or utime call fails.
Reported by Wichert Akkerman via Michael Stone.
|
|
of separate valid_fd variable.
|