Subject: bug#15173: [PATCH] cp: with --link always use linkat() if available

From: Paul Eggert <[email-masked]>
Date: Sun, 09 Feb 2014 18:29:13 -0800

Pádraig Brady wrote:
> +#if ! defined HAVE_LINKAT
>              && !(LINK_FOLLOWS_SYMLINKS && S_ISLNK (src_mode)
> -                && x->dereference == DEREF_NEVER))
> +                && x->dereference == DEREF_NEVER)
> +#endif

Could you reword that sort of thing so as not to use the #if inside an 
expression?  Something like this instead, perhaps, earlier in the code:

   #if !defined HAVE_LINKAT && LINK_FOLLOWS_SYMLINKS
   # define LINKAT_FOLLOWS_SYMLINKS 1
   #else
   # define LINKAT_FOLLOWS_SYMLINKS 0
   #endif

That way, the rest of the code can simply replace LINK_FOLLOWS_SYMLINKS 
with LINKAT_FOLLOWS_SYMLINKS, which will make it easier to read.