summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog3
-rw-r--r--Src/compat.c13
-rw-r--r--configure.in2
3 files changed, 17 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 39e71f5d4..07484aabc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2000-08-04  Clint Adams  <schizo@debian.org>
 
+	* 12541: configure.in, Src/compat.c: zrealpath wrapper around
+	realpath().
+
 	* 12533: Src/Modules/files.c: drop the tail of the path
 	passed to mkdir in the call to pathconf().
 
diff --git a/Src/compat.c b/Src/compat.c
index 2f6628f33..27c9c740c 100644
--- a/Src/compat.c
+++ b/Src/compat.c
@@ -141,6 +141,19 @@ zpathmax(char *dir)
 }
 #endif
 
+/**/
+mod_export char *
+zrealpath(const char *path, char *resolved_path)
+{
+#ifdef HAVE_REALPATH
+    return realpath(path, resolved_path);
+#else /* the following block should be replaced with a realpath() equiv. */
+    long pathmax;
+
+    if ((pathmax = zpathmax(path)) > 0)
+	return strncpy(resolved_path, path, pathmax);
+#endif
+}
 
 /**/
 mod_export char *
diff --git a/configure.in b/configure.in
index 6f813e0b0..8bd3ab408 100644
--- a/configure.in
+++ b/configure.in
@@ -864,7 +864,7 @@ AC_CHECK_FUNCS(strftime difftime gettimeofday \
 	       signgam \
 	       putenv getenv \
 	       brk sbrk \
-	       pathconf)
+	       pathconf realpath)
 AC_FUNC_STRCOLL
 
 if test $ac_cv_func_setpgrp = yes; then