summaryrefslogtreecommitdiff
path: root/lib/stdlib.in.h
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2009-09-10 15:44:15 -0600
committerEric Blake <ebb9@byu.net>2009-09-17 19:16:26 -0600
commit240faa59e81adc07c998eca0eccbee649a39af90 (patch)
treea49f0cb6137097053abb5898422f1c8250c7e9ea /lib/stdlib.in.h
parent99ad8ac789556142ef090fcaefae36aabef00ca4 (diff)
downloadgnulib-240faa59e81adc07c998eca0eccbee649a39af90.tar.gz
canonicalize-lgpl: use native realpath if it works
Forward-looking to when more platforms comply with POSIX 2008, but don't provide glibc extensions. For example, this could fix // handling in cygwin 1.7 (well, if cygwin didn't have bugs in .. handling). canonicalize can't use native realpath, for the same reason that it does not use resolvepath. * lib/canonicalize-lgpl.c (realpath): Guard with FUNC_REALPATH_WORKS. * lib/stdlib.in.h (realpath): Make declaration optional based on HAVE_REALPATH. * m4/canonicalize-lgpl.m4 (gl_CANONICALIZE_LGPL): Check whether native realpath works. * m4/stdlib_h.m4 (gl_STDLIB_H_DEFAULTS): Provide default. * modules/stdlib (Makefile.am): Substitute witness. Signed-off-by: Eric Blake <ebb9@byu.net>
Diffstat (limited to 'lib/stdlib.in.h')
-rw-r--r--lib/stdlib.in.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/stdlib.in.h b/lib/stdlib.in.h
index a6512c59c2..b20f699689 100644
--- a/lib/stdlib.in.h
+++ b/lib/stdlib.in.h
@@ -307,6 +307,8 @@ extern void * realloc (void *ptr, size_t size);
#if @GNULIB_REALPATH@
# if @REPLACE_REALPATH@
# define realpath rpl_realpath
+# endif
+# if !@HAVE_REALPATH@ || @REPLACE_REALPATH@
extern char *realpath (const char *name, char *resolved);
# endif
#elif defined GNULIB_POSIXCHECK