}
#endif
+ /*
+ * Enable Mac OS "copyfile()" extension by default.
+ * This has no effect on other platforms.
+ */
+ bsdtar->enable_copyfile = 1;
#ifdef COPYFILE_DISABLE_VAR
if (getenv(COPYFILE_DISABLE_VAR))
- bsdtar->disable_copyfile = 1;
+ bsdtar->enable_copyfile = 0;
#endif
bsdtar->argv = argv;
bsdtar->option_chroot = 1;
break;
case OPTION_DISABLE_COPYFILE: /* Mac OS X */
- bsdtar->disable_copyfile = 1;
+ bsdtar->enable_copyfile = 0;
break;
case OPTION_EXCLUDE: /* GNU tar */
if (lafe_exclude(&bsdtar->matching, bsdtar->optarg))
/* GNU tar 1.13 used -l for --one-file-system */
bsdtar->option_warn_links = 1;
break;
- case OPTION_LZMA:
+ case OPTION_LZMA: /* GNU tar beginning with 1.20 */
if (bsdtar->create_compression != '\0')
lafe_errc(1, 0,
"Can't specify both -%c and -%c", opt,
char option_unlink_first; /* -U */
char option_warn_links; /* --check-links */
char day_first; /* show day before month in -tv output */
- char disable_copyfile; /* For Mac OS */
+ char enable_copyfile; /* For Mac OS */
/* If >= 0, then close this when done. */
int fd;