[moving to bug-gnulib]

On 11/23/2010 02:03 PM, Paul Eggert wrote:
> On 11/23/10 08:16, Joerg Schilling wrote:
> 
>> The POSIX standard requires errno to be ELOOP in this case.
> 
> Quite right.  And I see that this incompatibility is not
> fixed in FreeBSD 9-current, at least according to the
> published manual page.  Christian, would you please report this
> to the FreeBSD folks, if they don't know about it already?
> 
> Christian's workaround is pretty easy, so I installed this:

> +++ b/src/extract.c
> @@ -609,6 +609,9 @@ 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.  */
> +    case EMLINK:

Should we instead patch gnulib's open() module to work around this bug,
so that tar can just rely on the gnulib module for POSIX semantics
instead of having to copy this workaround into all clients?

At any rate, this should be documented in gnulib's list of portability
pitfalls.

-- 
Eric Blake   ebl...@redhat.com    +1-801-349-2682
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to