aboutsummaryrefslogtreecommitdiff
path: root/stdlib/canonicalize.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-07-11 16:34:20 +0000
committerUlrich Drepper <drepper@redhat.com>2002-07-11 16:34:20 +0000
commit3e0dd85b103492e6b91e8e3bf60a997b04eb967f (patch)
tree0f46ec1386858194c583a6c680ec6fda2a6e8450 /stdlib/canonicalize.c
parent1ae915d98db1e07cf332e8a1fc86f3432f5c3614 (diff)
downloadglibc-3e0dd85b103492e6b91e8e3bf60a997b04eb967f.tar
glibc-3e0dd85b103492e6b91e8e3bf60a997b04eb967f.tar.gz
glibc-3e0dd85b103492e6b91e8e3bf60a997b04eb967f.tar.bz2
glibc-3e0dd85b103492e6b91e8e3bf60a997b04eb967f.zip
Update.
2002-07-11 Ulrich Drepper <drepper@redhat.com> * Versions.def (libc): Add GLIBC_2.3. * stdlib/Versions [libc] (GLIBC_2.3): Add realpath. * stdlib/canonicalize.c: Add compatibility version for realpath and make new code available in GLIBC_2.3.
Diffstat (limited to 'stdlib/canonicalize.c')
-rw-r--r--stdlib/canonicalize.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c
index c859288147..3394048fb3 100644
--- a/stdlib/canonicalize.c
+++ b/stdlib/canonicalize.c
@@ -26,6 +26,8 @@
#include <errno.h>
#include <stddef.h>
+#include <shlib-compat.h>
+
/* Return the canonical absolute name of file NAME. A canonical name
does not contain any `.', `..' components nor any repeated path
separators ('/') or symlinks. All path components must exist. If
@@ -204,7 +206,23 @@ error:
free (rpath);
return NULL;
}
-weak_alias (__realpath, realpath)
+versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
+
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3)
+char *
+__old_realpath (const char *name, char *resolved)
+{
+ if (resolved == NULL)
+ {
+ __set_errno (EINVAL);
+ return NULL;
+ }
+
+ return __realpath (name, resolved);
+}
+compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0);
+#endif
char *