-
- reedit++;
-#ifdef HAVE_LSTAT
- if (altmsg && mp && !is_readonly(mp) && (slinked ?
- lstat (linkpath, &st) != NOTOK &&
- S_ISREG(st.st_mode) &&
- copyf(linkpath, altpath) == NOTOK :
- stat(linkpath, &st) != NOTOK &&
- st.st_nlink == 1 &&
- (unlink(altpath) == NOTOK ||
- link(linkpath, altpath) == NOTOK)))
- advise(linkpath, "unable to update %s from", altmsg);
-#else /* HAVE_LSTAT */
- if (altmsg && mp && !is_readonly(mp) &&
- stat(linkpath, &st) != NOTOK &&
- st.st_nlink == 1 &&
- (unlink(altpath) == NOTOK ||
- link(linkpath, altpath) == NOTOK))
- advise(linkpath, "unable to update %s from", altmsg);
-#endif /* HAVE_LSTAT */