On 02/10/2014 02:29 AM, Paul Eggert wrote: > 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's slightly confusing as linkat() emulation never actually symlinks the referent. I went for the more direct: #if defined HAVE_LINKAT || ! LINK_FOLLOWS_SYMLINKS # define CAN_HARDLINK_SYMLINKS 1 #else # define CAN_HARDLINK_SYMLINKS 0 #endif Full patch is attached. thanks, Pádraig.