Commit Graph
24019 Commits
Author SHA1 Message Date
Jim Meyering 7d6185f0f5 (strerror_r): Do not declare unless !_LIBC.
Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
Use strerror_r that is only a macro, even if it is not a function.
(strerror): Check for HAVE_DECL_STRERROR before declaring.
(private_strerror): Use prototypes, not old-style function definition.
(print_errno_message): New function.
Support the POSIX 'int'-flavored strerror_r, as well as the traditional
char*-flavored one.
(error_tail, error, error_at_line): Use it.
2001-10-21 07:59:04 +00:00
Jim Meyering ad2abcb447 *** empty log message *** 2001-10-21 07:49:37 +00:00
Jim Meyering df8f50e9bc (jm_PREREQ_ERROR):
Do not invoke AC_CHECK_FUNCS with strerror_r, as
AC_FUNC_STRERROR_R does that.
2001-10-21 07:49:27 +00:00
Jim Meyering b5501a398e Add copyright notice, as nontrivial m4 files
are supposed to have them these days.
(AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
Merge changes from latest Autoconf CVS.
Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
POSIX decided to standardize on the int flavor of strerror_r.
2001-10-21 07:49:13 +00:00
Jim Meyering baef38bda1 *** empty log message *** 2001-10-20 19:13:41 +00:00
Jim Meyering dc421733a1 *** empty log message *** 2001-10-20 14:59:07 +00:00
Jim Meyering 968956b998 (usage): Improve the description of --dereference (-L). 2001-10-20 14:58:59 +00:00
Jim Meyering 8458d3c376 Declare some local variables to be `const', where appropriate. 2001-10-20 14:57:39 +00:00
Jim Meyering 7cdce2075e *** empty log message *** 2001-10-20 14:54:07 +00:00
Jim Meyering 891d094b56 (usage): Clarify description of --directory (-d).
Based on a patch from Michael Stone.
2001-10-20 14:53:45 +00:00
Jim Meyering c8445f75e0 *** empty log message *** 2001-10-20 14:41:31 +00:00
Jim Meyering 8afe15dd9b tweak 2001-10-20 14:41:23 +00:00
Jim Meyering 5cfcfdc5c7 Describe sticky files and directories. 2001-10-20 14:40:12 +00:00
Jim Meyering 9a40ef44fb *** empty log message *** 2001-10-20 14:01:33 +00:00
Jim Meyering 54a8b24b6e Don't use a umask that removes owner read/write.
Use a stricter test for permissions.
2001-10-20 14:01:23 +00:00
Jim Meyering f2d0d9bda9 Don't use a umask that removes owner
read/write.  That induces spurious failures in a probably-old
version of purify.
2001-10-20 13:59:57 +00:00
Jim Meyering 30b904e1f3 split a long line into two 2001-10-18 20:29:57 +00:00
Jim Meyering 8a385c1588 *** empty log message *** 2001-10-18 08:14:45 +00:00
Jim Meyering 493d1adca1 (movefile): Now that remember_copied xstrdup's the file name, free `new_dest'. 2001-10-18 08:13:28 +00:00
Jim Meyering 6a03579aa4 *** empty log message *** 2001-10-18 07:45:00 +00:00
Jim Meyering b564762ef5 Plug a leak.
(remember_copied): Use src_to_dest_free to free the entry we couldn't insert.
2001-10-18 07:44:41 +00:00
Jim Meyering a7870f9997 (dest_info_free): New function.
(dest_info_init): Make the hash table code use it.
(record_dest): Store each DEST in malloc'd  memory.  Hence the above.
Use dest_info_free to free the `ent' we couldn't insert.
2001-10-18 07:42:11 +00:00
Jim Meyering 37af708d04 *** empty log message *** 2001-10-17 10:24:13 +00:00
Jim Meyering 279d3ae95e (cp invocation): `cp --no-dereference' is
no longer equivalent to `cp -d'.
`cp -d' is equivalent to `--no-dereference --preserve=links'.
cp's -P option means --no-dereference, not --parents.
Describe new optional argument to --preserve.
Describe new option: --no-preserve=ATTRIBUTE_LIST.
2001-10-17 10:24:07 +00:00
Jim Meyering 321db91227 *** empty log message *** 2001-10-17 10:14:28 +00:00
Jim Meyering 99a1b10d2e *** empty log message *** 2001-10-17 10:11:52 +00:00
Jim Meyering 39f15c676a *** empty log message *** 2001-10-14 20:55:02 +00:00
Jim Meyering af51884dac Now, -P is the same as --no-dereference, per POSIX.
Use --parents to get the old meaning.

(enum) [NO_DEREFERENCE_OPTION]: Remove member.
(long_opts): Associate --no-dereference with `-P'.
(usage): Update description of -P.
(main): Remove local, used_P_option, and code to warn
that the meaning of -P would be changing.
2001-10-14 20:54:44 +00:00
Jim Meyering e3eb136b93 . 2001-10-13 21:42:16 +00:00
Jim Meyering a810608d0d *** empty log message *** 2001-10-13 20:53:41 +00:00
Jim Meyering d78d5d448f (copy_internal): Tighten up and add comments
describing the test for when to record (via remember_copied)
a <dst_path, source_dev, source_ino> triple.
Relax the test that guards the hard-linked-dir check and
the hard-link-preserving code.
2001-10-13 20:53:36 +00:00
Jim Meyering 8f28cc8708 add tests for some of the recent changes to cp 2001-10-13 20:44:59 +00:00
Jim Meyering 0dc71387d4 *** empty log message *** 2001-10-13 19:58:41 +00:00
Jim Meyering ed759a47cb (enum) [NO_DEREFERENCE_OPTION]: New member.
(enum) [NO_PRESERVE_ATTRIBUTES_OPTION]: New member.
(enum) [PRESERVE_ATTRIBUTES_OPTION]: New member.
(long_opts): Separate -d and --no-dereference options.
Add `no-preserve'.
Separate -p and --preserve options.
The long-named --preserve now accepts optional arguments; -p doesn't.
(usage): Describe additions and changes.
(cp_option_init): Initialize new member, preserve_links, to 0.
(decode_preserve_arg): New function.
(main) [case 'a']: Set preserve_links to 1.
[case 'd']: Set preserve_links to 1.
Add `case' for long-named --no-dereference.
Handle long-named --no-preserve and --preserve.
2001-10-13 19:57:08 +00:00
Jim Meyering a5f6a3dc40 (cp_option_init): Initialize new member to 1. 2001-10-13 19:41:17 +00:00
Jim Meyering 8429ee57dd (cp_option_init): Initialize new member, preserve_links. 2001-10-13 19:40:31 +00:00
Jim Meyering 95cc4c0984 (enum Dereference_symlink): Add comments.
(struct cp_options) [preserve_links]: New member.
2001-10-13 19:36:26 +00:00
Jim Meyering ef549ef73e *** empty log message *** 2001-10-13 19:13:16 +00:00
Jim Meyering 6d334f8f62 (cp_option_init): Don't set it. 2001-10-13 19:12:52 +00:00
Jim Meyering da73a665f0 (struct cp_options) [failed_unlink_is_fatal]: Remove unused member. 2001-10-13 19:12:06 +00:00
Jim Meyering 72695161da *** empty log message *** 2001-10-13 17:25:17 +00:00
Jim Meyering 66372e29eb * src/copy.h (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
* src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13 17:24:38 +00:00
Jim Meyering b604e6b1f1 * src/copy.h (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
* src/copy.c, src/cp.c, src/install.c, src/mv.c: Update all uses.
2001-10-13 17:24:09 +00:00
Jim Meyering 039d440f50 (struct cp_options): Rename members:
s/preserve_owner_and_group/preserve_ownership/, and
s/preserve_chmod_bits/preserve_mode/.
2001-10-13 17:23:44 +00:00
Jim Meyering f40532072e *** empty log message *** 2001-10-13 16:54:18 +00:00
Jim Meyering b9f3b0ed92 *** empty log message *** 2001-10-13 16:51:09 +00:00
Jim Meyering 35e2136e59 Fix typo: s/Sh/SH/ before OPTIONS. 2001-10-13 16:50:59 +00:00
Jim Meyering 209557e03a don't use diff 2001-10-12 21:47:06 +00:00
Jim Meyering d225261a77 *** empty log message *** 2001-10-12 07:03:12 +00:00
Jim Meyering 0f14bad291 (TESTS): Add infloop.
(XFAIL_TESTS): Mark it as a test that we expect to fail (temporarily).
2001-10-12 07:03:04 +00:00