summaryrefslogtreecommitdiff
path: root/src/touch.c
AgeCommit message (Collapse)Author
2000-11-10(main): Interpret a lone numeric argument of 8 or 10Jim Meyering
digits as a file name, rather than as a date/time in the obsolescent `MMDDhhmm[YY]' format. Reported by Wenjun Zheng.
2000-07-30tweak diagnosticJim Meyering
2000-07-25Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call. Add more precise diagnostics.
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-04-30(O_NOCTTY): Define if not defined already.Jim Meyering
(touch): Add O_NOCTTY to the flags passed to open.
2000-02-03(O_NDELAY): Define to 0 if not defined.Jim Meyering
(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.
1999-12-09(anonymous enum): Define TIME_OPTION, and ...Jim Meyering
(longopts): ...use it here instead of `CHAR_MAX + 1'. (main): Likewise.
1999-12-04Give the right diagnostic when failing to create a file in anJim Meyering
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.
1999-11-14(touch): Simplify code a tad, using fd == -1 insteadJim Meyering
of separate valid_fd variable.
1999-11-13(touch): Don't fail just because we couldn't openJim Meyering
an existing file. This makes it so that touching a read-only file now works. Also clean up and simplify. Based on a patch from Chip Salzenberg.
1999-10-23(full_write): Remove unused decl.Jim Meyering
(open_maybe_create): Remove. (touch): Don't record whether the file was created; this isn't possible to do reliably and portably without race conditions. If the file was created and if amtime_now is nonzero, this change means we'll have to do another utime system call, but that's no more harmful than the previous version of this code.
1999-09-09(usage): Remove misleading sentence in --help output.Jim Meyering
From Karl Heuer.
1999-08-08(usage): Clarify description of --time=WORD.Jim Meyering
1999-05-15(open_maybe_create): Handle Solaris' failure mode whenJim Meyering
FILE is a directory. Reported by Vin Shelton.
1999-05-07(touch): Only do the fstat if we need to.Jim Meyering
Resort to calling stat for directories, but only when necessary. (usage): Mention --no-create.
1999-04-26(open_maybe_create): Don't pass 0666 to open; it's not needed and isn'tJim Meyering
guaranteed to be portable.
1999-04-02(open_maybe_create): New function.Jim Meyering
(touch): Rewrite not to use `creat' and to eliminate a race condition that could make touch truncate a nonempty file. Report and suggestions from Andrew Tridgell.
1999-04-01(touch): Qualify a char* with the `const' keyword.Jim Meyering
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.
1999-03-26No longer include long-options.h.Jim Meyering
Include version-etc.h instead. (PROGRAM_NAME, AUTHORS): Define. [long_options]: Add entries for --help and --version. Remove parse_long_options call. (main) [getopt switch]: Add a case for each of --help and --version.
1999-03-04Include long-options.hJim Meyering
[long_options]: Remove the "help" and "version" entries. (main): Use parse_long_options, including author name(s). Remove the show_version and show_help blocks.
1999-01-16(usage): Remove `static'.Jim Meyering
Use function-style XARGMATCH.
1999-01-04(main): remove unused `i'Jim Meyering
1999-01-02Adapt to use new interface to XARGMATCH.Jim Meyering
1998-12-31(main): Use XARGCASEMATCH in place of argmatch & co.Jim Meyering
1998-09-19update bug-reporting addressJim Meyering
1998-09-07Include posixtm.h.Jim Meyering
(usage): Correct the description of the format of the date string argument to -t option. (main): Update to use rewritten posixtime function. Reported by Andries Brouwer.
1998-09-06remove --help-style comment near topJim Meyering
1998-08-30Don't assume ASCII in getopt arg handling.Jim Meyering
1998-08-02(touch): Add comment.Jim Meyering
1998-07-25(utime_now): Moved into m4/utimes.m4.Jim Meyering
(touch) [!HAVE_UTIME_NULL]: Remove #ifdef and use of utime_now in if-block.
1998-05-09Include safe-read.h.Jim Meyering
Don't declare safe_read.
1998-04-14Use STREQ in string equality tests, not strcmp.Jim Meyering
1998-03-15Use #if, not #ifdef with HAVE_ macros.Jim Meyering
Use #if !, not #ifndef with HAVE_ macros.
1998-03-14s/get-date.h/getdate.h/Jim Meyering
1998-02-20Include get-date.h.Jim Meyering
Remove get_date decl.
1998-01-04(main, usage): Check for write error to stdout before exiting.Jim Meyering
Include "closeout.h".
1997-10-07update bug-reporting addressJim Meyering
1997-02-09update copyrights for 1997Jim Meyering
1997-02-01bracket bug address with <> and append a periodJim Meyering
1997-02-01Compare getopt_long return value against -1, not EOF. Use NULL, not '(int ↵Jim Meyering
*) 0' as last parameter in getopt_long call.
1996-11-18Remove unused declaration of mktime. From Tony Leneis.Jim Meyering
1996-11-03change bug-reporting addressJim Meyering
1996-11-02change bug-reporting addressJim Meyering
1996-10-05(main): update --version output to conform to coding standardJim Meyering
1996-10-04(main): update --version output to conform to coding standardJim Meyering
1996-08-31(utime_now): Protoize.Jim Meyering
Reported by David S. Miller (davem@caip.rutgers.edu).
1996-08-31(usage): remove spurious trailing \n in puts.Jim Meyering
1996-08-29(usage): Tell where to report bugs.Jim Meyering
1996-04-24update Copyright years for 1996Jim Meyering