[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Incorrect use of USE_XATTR in coreutils-8.4

From: Eric Blake
Subject: Re: Incorrect use of USE_XATTR in coreutils-8.4
Date: Sat, 16 Jan 2010 06:51:11 -0700
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv: Gecko/20090812 Thunderbird/ Mnenhy/

According to Adam Sampson on 1/16/2010 4:42 AM:
> Hiya,
> I've just built coreutils 8.4 on a machine with libattr installed, and
> found that tests/cp/cp-mv-enotsup-xattr was failing because cp was
> incorrectly giving the "cp is built without xattr support" error
> message. The problem appears to be that the configure script defines
> USE_XATTR to "yes" if attr support is enabled, but copy.c and cp.c use
> "#if USE_XATTR"/"#if !USE_XATTR" to test it. The attached patch changes
> these to use #ifdef/#ifndef, which makes the testsuite pass for me.

Thanks for the report.  Actually, the correct fix is in m4/xattr.m4, which
was accidentally broken in commit 6beca4248f.  Prior to that patch, the
shell variable $use_xattr had two purposes: it could be yes or no if the
header was present, and if yes, it was then reassigned to 0 or 1 for use
in assigning the value of USE_XATTR in the config.h header.  After that
commit, $use_xattr is only yes or no (which is certainly less confusing),
but that means a non-numeric value got leaked through to the config.h
substitution.  Jim, how about the following patch?

Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden

Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]