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.