|
| From: | Pádraig Brady |
| Subject: | Re: Incorrect use of USE_XATTR in coreutils-8.4 |
| Date: | Mon, 18 Jan 2010 10:32:11 +0000 |
| User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.5) Gecko/20091204 Thunderbird/3.0 |
On 17/01/10 08:03, Jim Meyering wrote:
Thanks!
That would fix it, but please retain the 0/1 semantics, in case
we ever want to use USE_XATTR in a C (as opposed to cpp) expression.
# Map yes,no to 1,0.
AC_DEFINE_UNQUOTED([USE_XATTR],
[`test $use_xattr = yes&& echo 1 || echo 0`],
[Define if you want extended attribute support.])
I know this is not the norm for USE_* variables e.g., in gnulib,
but I have come to appreciate being able to use 0/1 cpp symbols
in C code (albeit not often), for readability.
Also if all variables were defined to something then we could enable -Wundef which would catch this case: #define USE_XATTR yes #if XATTR ... cheers, Pádraig.
| [Prev in Thread] | Current Thread | [Next in Thread] |