diff options
author | Jim Meyering <jim@meyering.net> | 1999-04-26 13:03:11 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1999-04-26 13:03:11 +0000 |
commit | 73e540ea1b67f8a4a2da4c5e22125d487e01c98f (patch) | |
tree | 602d698d6b8d0ba770f8e5968aec564e072fe87f /src | |
parent | 12dd796d8a4459d3501a1435cabfff6f3bba4f6c (diff) | |
download | coreutils-73e540ea1b67f8a4a2da4c5e22125d487e01c98f.tar.xz |
(do_copy, cp_option_init, main): Use proper mode_t types and macros.
Don't assume the traditional Unix values for mode bits.
Diffstat (limited to 'src')
-rw-r--r-- | src/cp.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -461,7 +461,7 @@ do_copy (int argc, char **argv, const struct cp_options *x) leading directories. */ parent_exists = !make_path_private (dst_path, arg_in_concat - dst_path, - 0700, + S_IRWXU, (x->verbose ? "%s -> %s\n" : NULL), &attr_list, &new_dst, @@ -617,7 +617,7 @@ cp_option_init (struct cp_options *x) when using chmod. The creation mask is set to be liberal, so that created directories can be written, even if it would not have been allowed with the mask this process was started with. */ - x->umask_kill = 0777777 ^ umask (0); + x->umask_kill = ~ umask (0); x->update = 0; x->verbose = 0; @@ -759,7 +759,7 @@ main (int argc, char **argv) : none); if (x.preserve_chmod_bits == 1) - x.umask_kill = 0777777; + x.umask_kill = ~ (mode_t) 0; /* The key difference between -d (--no-dereference) and not is the version of `stat' to call. */ |