+#if HAVE_LINK && !USE_SYMLINKS
+ /*
+ * If the file has more than one link, the reason for the previous
+ * write could be that the current primary name used to be an alias for
+ * the previous entry. In that case, unlink the file so that we will
+ * not modify the previous entry as we write this one.
+ */
+ if (statbuf.st_nlink > 1) {
+ _nc_warning("name redefined.");
+ unlink(filename);
+ } else {
+ _nc_warning("name multiply defined.");
+ }
+#else