platform/upstream/coreutils.git
24 years agocomment
Jim Meyering [Sun, 3 Sep 2000 13:18:22 +0000 (13:18 +0000)]
comment

24 years agoUse strcoll (not strcmp) when comparing file names.
Jim Meyering [Sun, 3 Sep 2000 13:06:41 +0000 (13:06 +0000)]
Use strcoll (not strcmp) when comparing file names.

24 years ago(struct cp_options) [force]: Remove member.
Jim Meyering [Sun, 3 Sep 2000 13:04:44 +0000 (13:04 +0000)]
(struct cp_options) [force]: Remove member.
[unlink_dest_before_opening]: Add member.
[unlink_dest_after_failed_open]: Add member.

24 years ago(same_file_ok): New function, extracted from copy_internal,
Jim Meyering [Sun, 3 Sep 2000 13:01:49 +0000 (13:01 +0000)]
(same_file_ok): New function, extracted from copy_internal,
and partially rewritten.
(copy_internal): Unlink destination file when unlink_dest_before_opening
option is set, and when the source is neither a regular file nor a directory.

24 years ago*** empty log message ***
Jim Meyering [Sat, 2 Sep 2000 09:44:47 +0000 (09:44 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 2 Sep 2000 09:32:01 +0000 (09:32 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 2 Sep 2000 09:30:03 +0000 (09:30 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 2 Sep 2000 09:28:31 +0000 (09:28 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 2 Sep 2000 09:08:31 +0000 (09:08 +0000)]
*** empty log message ***

24 years agoadd basic test
Jim Meyering [Sat, 2 Sep 2000 07:55:32 +0000 (07:55 +0000)]
add basic test

24 years ago*** empty log message ***
Jim Meyering [Wed, 30 Aug 2000 07:58:05 +0000 (07:58 +0000)]
*** empty log message ***

24 years agoMerge in changes from GNU libc.
Jim Meyering [Wed, 30 Aug 2000 07:58:01 +0000 (07:58 +0000)]
Merge in changes from GNU libc.

24 years agodeclare __fpending only if necessary
Jim Meyering [Mon, 28 Aug 2000 14:55:18 +0000 (14:55 +0000)]
declare __fpending only if necessary

24 years agocheck for __fpending declaration
Jim Meyering [Mon, 28 Aug 2000 14:53:10 +0000 (14:53 +0000)]
check for __fpending declaration

24 years agoinclude stdio_ext.h
Jim Meyering [Mon, 28 Aug 2000 14:50:37 +0000 (14:50 +0000)]
include stdio_ext.h

24 years ago*** empty log message ***
Jim Meyering [Sun, 27 Aug 2000 09:50:08 +0000 (09:50 +0000)]
*** empty log message ***

24 years ago.
Jim Meyering [Sun, 27 Aug 2000 09:30:11 +0000 (09:30 +0000)]
.

24 years ago(copy_reg): New parameters: X and NEW_DST.
Jim Meyering [Sun, 27 Aug 2000 09:30:00 +0000 (09:30 +0000)]
(copy_reg): New parameters: X and NEW_DST.
Remove the SPARSE_MODE parameter.  Update caller.
Perform POSIX-mandated (for cp) open-with-O_WRONLY|O_TRUNC when
the regular destination file exists;  upon failure, unlink
that existing file, then open again, but with O_WRONLY|O_CREAT.
(copy_internal): `force' in not related to interactive; remove
the conjunct.
Remove the entire `else if (x->force)' block;  justifying
removal of the non-directory part is easy:  POSIX requires we try
to open an existing regular file, so we can't unlink it beforehand.
The part that changes the mode on a directory to allow overwriting
isn't necessary.

24 years ago(copy_internal): Set `new_dst' when the move_mode rename fails,
Jim Meyering [Sun, 27 Aug 2000 08:46:21 +0000 (08:46 +0000)]
(copy_internal): Set `new_dst' when the move_mode rename fails,
since we then unlink the destination file.

24 years ago(copy_reg): Rename two goto labels.
Jim Meyering [Sun, 27 Aug 2000 08:33:35 +0000 (08:33 +0000)]
(copy_reg): Rename two goto labels.

24 years ago.
Jim Meyering [Sat, 26 Aug 2000 22:24:50 +0000 (22:24 +0000)]
.

24 years ago(usage): --force is independent of --interactive.
Jim Meyering [Sat, 26 Aug 2000 22:24:31 +0000 (22:24 +0000)]
(usage): --force is independent of --interactive.

24 years ago.
Jim Meyering [Sat, 26 Aug 2000 15:40:01 +0000 (15:40 +0000)]
.

24 years ago.
Jim Meyering [Sat, 26 Aug 2000 15:39:39 +0000 (15:39 +0000)]
.

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 12:05:55 +0000 (12:05 +0000)]
*** empty log message ***

24 years agoInclude "__fpending.h".
Jim Meyering [Sat, 26 Aug 2000 12:05:50 +0000 (12:05 +0000)]
Include "__fpending.h".
(close_stdout_status): Return right away if there's nothing to flush.

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 12:04:46 +0000 (12:04 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 12:04:13 +0000 (12:04 +0000)]
*** empty log message ***

24 years ago(noinst_HEADERS): Add __fpending.h.
Jim Meyering [Sat, 26 Aug 2000 12:04:01 +0000 (12:04 +0000)]
(noinst_HEADERS): Add __fpending.h.

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:59:55 +0000 (11:59 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:58:08 +0000 (11:58 +0000)]
*** empty log message ***

24 years agoUse jm_FUNC_FPENDING.
Jim Meyering [Sat, 26 Aug 2000 11:56:54 +0000 (11:56 +0000)]
Use jm_FUNC_FPENDING.

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:56:20 +0000 (11:56 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:55:12 +0000 (11:55 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:46:21 +0000 (11:46 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:44:00 +0000 (11:44 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:26:11 +0000 (11:26 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 26 Aug 2000 11:25:48 +0000 (11:25 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Fri, 25 Aug 2000 07:43:45 +0000 (07:43 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Fri, 25 Aug 2000 07:39:22 +0000 (07:39 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Thu, 24 Aug 2000 11:39:14 +0000 (11:39 +0000)]
*** empty log message ***

24 years agoPut back the kluge. It's necessary after all.
Jim Meyering [Thu, 24 Aug 2000 11:39:08 +0000 (11:39 +0000)]
Put back the kluge.  It's necessary after all.
(buggy_lseek_support): New function.
(skip): Use it.
Frank Adler reported that although _llseek returns 0, lseek
erroneously returns an offset suggesting the operation succeeded
even though it fails.

24 years ago*** empty log message ***
Jim Meyering [Thu, 24 Aug 2000 11:36:28 +0000 (11:36 +0000)]
*** empty log message ***

24 years ago.
Jim Meyering [Thu, 24 Aug 2000 08:40:47 +0000 (08:40 +0000)]
.

24 years ago.
Jim Meyering [Thu, 24 Aug 2000 08:40:08 +0000 (08:40 +0000)]
.

24 years ago*** empty log message ***
Jim Meyering [Thu, 24 Aug 2000 08:37:06 +0000 (08:37 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Thu, 24 Aug 2000 08:36:47 +0000 (08:36 +0000)]
*** empty log message ***

24 years ago(skip): Assume lseek failed if it returned zero, since a zero return is
Jim Meyering [Thu, 24 Aug 2000 08:34:33 +0000 (08:34 +0000)]
(skip): Assume lseek failed if it returned zero, since a zero return is
impossible and some buggy drivers return zero.

Use SEEK_CUR rather than SEEK_SET; this fixes a bug when the
file descriptor is not currently rewound.

24 years ago*** empty log message ***
Jim Meyering [Wed, 23 Aug 2000 16:26:55 +0000 (16:26 +0000)]
*** empty log message ***

24 years agoInclude <config.h> unconditionally, to be consistent
Jim Meyering [Wed, 23 Aug 2000 16:26:39 +0000 (16:26 +0000)]
Include <config.h> unconditionally, to be consistent
with all the other programs in this directory.

24 years ago*** empty log message ***
Jim Meyering [Wed, 23 Aug 2000 07:54:41 +0000 (07:54 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Wed, 23 Aug 2000 07:54:23 +0000 (07:54 +0000)]
*** empty log message ***

24 years agolonger input
Jim Meyering [Wed, 23 Aug 2000 07:54:06 +0000 (07:54 +0000)]
longer input

24 years agoredir dd's stderr
Jim Meyering [Wed, 23 Aug 2000 07:49:05 +0000 (07:49 +0000)]
redir dd's stderr

24 years agochange PROG from ls to dd
Jim Meyering [Wed, 23 Aug 2000 07:48:11 +0000 (07:48 +0000)]
change PROG from ls to dd

24 years ago(TESTS): Add not-rewound.
Jim Meyering [Wed, 23 Aug 2000 07:47:52 +0000 (07:47 +0000)]
(TESTS): Add not-rewound.

24 years ago*** empty log message ***
Jim Meyering [Wed, 23 Aug 2000 07:45:59 +0000 (07:45 +0000)]
*** empty log message ***

24 years agouse better trap
Jim Meyering [Wed, 23 Aug 2000 07:38:21 +0000 (07:38 +0000)]
use better trap

24 years ago*** empty log message ***
Jim Meyering [Wed, 23 Aug 2000 07:35:22 +0000 (07:35 +0000)]
*** empty log message ***

24 years agoback out last change
Jim Meyering [Wed, 23 Aug 2000 07:33:28 +0000 (07:33 +0000)]
back out last change

24 years ago*** empty log message ***
Jim Meyering [Tue, 22 Aug 2000 11:12:06 +0000 (11:12 +0000)]
*** empty log message ***

24 years agoDon't even try to use lseek on character devices.
Jim Meyering [Tue, 22 Aug 2000 11:12:01 +0000 (11:12 +0000)]
Don't even try to use lseek on character devices.
(buggy_lseek_support): New function.
(skip): Use it.
Reported by Martin Gallant via Michael Stone.

24 years ago*** empty log message ***
Jim Meyering [Tue, 22 Aug 2000 11:05:47 +0000 (11:05 +0000)]
*** empty log message ***

24 years agoClean up traps. Create files in a subdir.
Jim Meyering [Mon, 21 Aug 2000 09:45:52 +0000 (09:45 +0000)]
Clean up traps.  Create files in a subdir.

24 years agoremove `dir' in trap, too
Jim Meyering [Mon, 21 Aug 2000 09:41:56 +0000 (09:41 +0000)]
remove `dir' in trap, too

24 years agouse better trap
Jim Meyering [Mon, 21 Aug 2000 09:39:59 +0000 (09:39 +0000)]
use better trap

24 years ago*** empty log message ***
Jim Meyering [Mon, 21 Aug 2000 05:29:32 +0000 (05:29 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Mon, 21 Aug 2000 05:15:55 +0000 (05:15 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:48:42 +0000 (22:48 +0000)]
*** empty log message ***

24 years agoremove blank line
Jim Meyering [Sun, 20 Aug 2000 22:46:16 +0000 (22:46 +0000)]
remove blank line

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:46:05 +0000 (22:46 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 22:35:52 +0000 (22:35 +0000)]
*** empty log message ***

24 years ago.
Jim Meyering [Sun, 20 Aug 2000 21:16:36 +0000 (21:16 +0000)]
.

24 years agoNew file. From J. David Anglin.
Jim Meyering [Sun, 20 Aug 2000 21:12:36 +0000 (21:12 +0000)]
New file.  From J. David Anglin.

24 years ago*** empty log message *** FILEUTILS-4_0y
Jim Meyering [Sun, 20 Aug 2000 21:04:38 +0000 (21:04 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:04:26 +0000 (21:04 +0000)]
*** empty log message ***

24 years ago(TESTS): Add cp-HL.
Jim Meyering [Sun, 20 Aug 2000 21:04:20 +0000 (21:04 +0000)]
(TESTS): Add cp-HL.

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:03:48 +0000 (21:03 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 21:03:03 +0000 (21:03 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 20:50:26 +0000 (20:50 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 20:49:58 +0000 (20:49 +0000)]
*** empty log message ***

24 years ago(cp_option_init): Initialize to DEREF_ALWAYS, not `1'.
Jim Meyering [Sun, 20 Aug 2000 20:49:44 +0000 (20:49 +0000)]
(cp_option_init): Initialize to DEREF_ALWAYS, not `1'.

24 years ago(cp_option_init): Initialize to DEREF_NEVER, not `0'.
Jim Meyering [Sun, 20 Aug 2000 20:49:34 +0000 (20:49 +0000)]
(cp_option_init): Initialize to DEREF_NEVER, not `0'.

24 years ago(long_opts): Add --dereference, -L.
Jim Meyering [Sun, 20 Aug 2000 20:48:57 +0000 (20:48 +0000)]
(long_opts): Add --dereference, -L.
(usage): Describe -L and -H.
(cp_option_init): Initialize to DEREF_UNDEFINED, not `1'.
(main): Add `H' and `-L' to getopt spec string.
[case 'a']: Initialize `dereference' to DEREF_NEVER, not 0.
[case 'd']: Likewise.
[case 'H']: New case.
[case 'L']: New case.
[case 'R']: Don't set dereference to `0' here.
If it's not yet defined, set x.dereference to DEREF_NEVER
if -R was specified, else set it to DEREF_ALWAYS.
Set x.xstat accordingly for -H.

24 years agoDeclare lstat.
Jim Meyering [Sun, 20 Aug 2000 20:48:45 +0000 (20:48 +0000)]
Declare lstat.
(copy_dir): Set `xstat' member to lstat so that with `-H' we don't
follow symlinks found via recursive traversal.
Update uses of `dereference' to compare against new enum member names.

24 years ago(enum Dereference_symlink): Define.
Jim Meyering [Sun, 20 Aug 2000 20:35:25 +0000 (20:35 +0000)]
(enum Dereference_symlink): Define.
(struct cp_options) [dereference]: Change type to Dereference_symlink.

24 years ago.
Jim Meyering [Sun, 20 Aug 2000 16:48:02 +0000 (16:48 +0000)]
.

24 years ago.
Jim Meyering [Sun, 20 Aug 2000 15:56:43 +0000 (15:56 +0000)]
.

24 years ago.
Jim Meyering [Sun, 20 Aug 2000 15:56:11 +0000 (15:56 +0000)]
.

24 years ago*** empty log message ***
Jim Meyering [Sun, 20 Aug 2000 12:45:35 +0000 (12:45 +0000)]
*** empty log message ***

24 years agoInclude utmp.h `#if HAVE_UTMP_H', rather than
Jim Meyering [Sun, 20 Aug 2000 12:45:31 +0000 (12:45 +0000)]
Include utmp.h `#if HAVE_UTMP_H', rather than
`#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
utmp.h nor utmpx.h.  Reported by Eli Zaretskii.

24 years ago(print_totals): Rename global from opt_combined_arguments.
Jim Meyering [Sun, 20 Aug 2000 09:55:23 +0000 (09:55 +0000)]
(print_totals): Rename global from opt_combined_arguments.

24 years agofix my grammar error in last change
Jim Meyering [Sat, 19 Aug 2000 11:09:03 +0000 (11:09 +0000)]
fix my grammar error in last change

24 years ago*** empty log message ***
Jim Meyering [Sat, 19 Aug 2000 11:07:46 +0000 (11:07 +0000)]
*** empty log message ***

24 years ago*** empty log message ***
Jim Meyering [Sat, 19 Aug 2000 11:07:37 +0000 (11:07 +0000)]
*** empty log message ***

24 years ago(writeline): Correct comments.
Jim Meyering [Sat, 19 Aug 2000 11:07:32 +0000 (11:07 +0000)]
(writeline): Correct comments.
From Bruno Haible.

24 years ago*** empty log message ***
Jim Meyering [Fri, 18 Aug 2000 07:08:34 +0000 (07:08 +0000)]
*** empty log message ***

24 years ago(DO_CHOWN): Do not make a special case for non-root.
Jim Meyering [Fri, 18 Aug 2000 07:08:04 +0000 (07:08 +0000)]
(DO_CHOWN): Do not make a special case for non-root.
POSIX.2 requires that cp -p and mv attempt to set the uid of the
destination file, even if you're not root.  This affects behavior
only on hosts that let you give files away via chmod.

24 years ago*** empty log message ***
Jim Meyering [Tue, 15 Aug 2000 13:12:57 +0000 (13:12 +0000)]
*** empty log message ***

24 years agoAdd tests for just-fixed bug.
Jim Meyering [Tue, 15 Aug 2000 13:12:48 +0000 (13:12 +0000)]
Add tests for just-fixed bug.