]> Dogcows Code - chaz/tar/commitdiff
tar: work around NetBSD and Tru64 symlink incompatibility with POSIX
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Nov 2010 07:07:46 +0000 (23:07 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 25 Nov 2010 07:08:07 +0000 (23:08 -0800)
Problem reported by Bruno Haible in
<http://lists.gnu.org/archive/html/bug-gnulib/2010-11/msg00306.html>.
* src/extract.c (maybe_recoverable):  Also treat EFTYPE (if defined)
and ENOTSUP like ELOOP.

src/extract.c

index c52c9ce8f13ccd24e0dc45e3da45a7633245db8b..aaea56ed3abcfcfb2bfde356715f6133e22e4fae 100644 (file)
@@ -609,9 +609,18 @@ maybe_recoverable (char *file_name, bool regular, bool *interdir_made)
   switch (e)
     {
     case ELOOP:
+
       /* With open ("symlink", O_NOFOLLOW|...), POSIX says errno == ELOOP,
-        but FreeBSD through at least 8.1 uses errno == EMLINK.  */
+        but some operating systems do not conform to the standard.  */
+#ifdef EFTYPE
+      /* NetBSD uses errno == EFTYPE; see <http://gnats.netbsd.org/43154>.  */
+    case EFTYPE:
+#endif
+      /* FreeBSD 8.1 uses errno == EMLINK.  */
     case EMLINK:
+      /* Tru64 5.1B uses errno == ENOTSUP.  */
+    case ENOTSUP:
+
       if (! regular
          || old_files_option != OVERWRITE_OLD_FILES || dereference_option)
        break;
This page took 0.022964 seconds and 4 git commands to generate.