return 0;
}
+/*
+ * Get the maximal number of symlinks to follow. Use sysconf() on
+ * Hurd where the hardcoded value MAXSYMLINKS is not available.
+ */
+static int maxsymlinks(void)
+{
+ int v = sysconf(_SC_SYMLOOP_MAX);
+#ifdef MAXSYMLINKS
+ if (v == -1)
+ return MAXSYMLINKS;
+#endif
+ return v;
+}
+
/*
* Check path is located on a network based partition.
*/
{
char buf[PATH_MAX+1];
const char *curr;
- int deep = MAXSYMLINKS;
+ int deep = maxsymlinks();
if (!nlist) return 0;