|
From: | Paul Eggert |
Subject: | bug#15173: [PATCH] cp: with --link always use linkat() if available |
Date: | Sun, 09 Feb 2014 18:29:13 -0800 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.2.0 |
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 #endifThat way, the rest of the code can simply replace LINK_FOLLOWS_SYMLINKS with LINKAT_FOLLOWS_SYMLINKS, which will make it easier to read.
[Prev in Thread] | Current Thread | [Next in Thread] |