#if defined(_WIN32) && !defined(__CYGWIN__)
#define _PATH_DEFTAPE "\\\\.\\tape0"
#endif
+#if defined(__APPLE__)
+#define _PATH_DEFTAPE "-" /* Mac OS has no tape support, default to stdio. */
+#endif
#ifndef _PATH_DEFTAPE
#define _PATH_DEFTAPE "/dev/tape"
break;
case 'f': /* SUSv2 */
bsdtar->filename = bsdtar->optarg;
- if (strcmp(bsdtar->filename, "-") == 0)
- bsdtar->filename = NULL;
break;
case 'H': /* BSD convention */
bsdtar->symlink_mode = 'H';
if (bsdtar->strip_components != 0)
only_mode(bsdtar, "--strip-components", "xt");
+ /* Filename "-" implies stdio. */
+ if (strcmp(bsdtar->filename, "-") == 0)
+ bsdtar->filename = NULL;
+
switch(bsdtar->mode) {
case 'c':
tar_mode_c(bsdtar);