{
TARGET_DIRECTORY_OPTION = CHAR_MAX + 1,
SPARSE_OPTION,
- STRIP_TRAILING_SLASHES_OPTION
+ STRIP_TRAILING_SLASHES_OPTION,
+ PARENTS_OPTION
};
int stat ();
{"link", no_argument, NULL, 'l'},
{"no-dereference", no_argument, NULL, 'd'},
{"one-file-system", no_argument, NULL, 'x'},
- {"parents", no_argument, NULL, 'P'},
- {"path", no_argument, NULL, 'P'},
+ {"parents", no_argument, NULL, PARENTS_OPTION},
+ {"path", no_argument, NULL, PARENTS_OPTION}, /* Deprecated. */
{"preserve", no_argument, NULL, 'p'},
{"recursive", no_argument, NULL, 'R'},
{"strip-trailing-slash", no_argument, NULL, STRIP_TRAILING_SLASHES_OPTION},
-i, --interactive prompt before overwrite\n\
-l, --link link files instead of copying\n\
-p, --preserve preserve file attributes if possible\n\
- -P, --parents append source path to DIRECTORY\n\
+ --parents append source path to DIRECTORY\n\
+ -P same as `--parents' for now; soon to change to\n\
+ produce the POSIX-mandated behavior\n\
-r copy recursively, non-directories as files\n\
WARNING: use -R instead when you might copy\n\
special files like FIFOs or /dev/zero\n\
char *version_control_string = NULL;
struct cp_options x;
char *target_directory = NULL;
+ int used_P_option = 0;
program_name = argv[0];
setlocale (LC_ALL, "");
break;
case 'P':
+ used_P_option = 1;
+ /* fall through */
+ case PARENTS_OPTION:
flag_path = 1;
break;
case 'R':
x.recursive = 1;
+ x.dereference = 0;
x.copy_as_regular = 0;
break;
usage (1);
}
+ if (used_P_option)
+ {
+ error (0, 0,
+ _("warning: the meaning of `-P' will change to conform with\
+ the POSIX\nspecification in an upcoming release; if you want the old\
+ behavior,\nuse the `--parents' option instead."));
+ }
+
if (backup_suffix_string)
simple_backup_suffix = xstrdup (backup_suffix_string);