#include <dirent.h>
#include "daemon.h"
+#include "optgroups.h"
#include "actions.h"
/* On Windows, NAME_MAX is not defined. */
#define NAME_MAX FILENAME_MAX
#endif
+int
+optgroup_realpath_available (void)
+{
+#ifdef HAVE_REALPATH
+ return 1;
+#else
+ return 0;
+#endif
+}
+
char *
do_realpath (const char *path)
{
+#ifdef HAVE_REALPATH
char *ret;
CHROOT_IN;
}
return ret; /* caller frees */
+#else
+ NOT_AVAILABLE (NULL);
+#endif
}
char *
This calls the external C<zfgrep -i> program and returns the
matching lines.");
- ("realpath", (RString "rpath", [Pathname "path"]), 163, [],
+ ("realpath", (RString "rpath", [Pathname "path"]), 163, [Optional "realpath"],
[InitISOFS, Always, TestOutput (
[["realpath"; "/../directory"]], "/directory")],
"canonicalized absolute pathname",