From 3e0dd85b103492e6b91e8e3bf60a997b04eb967f Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 11 Jul 2002 16:34:20 +0000 Subject: Update. 2002-07-11 Ulrich Drepper * 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. --- stdlib/Versions | 4 ++++ stdlib/canonicalize.c | 20 +++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'stdlib') diff --git a/stdlib/Versions b/stdlib/Versions index c2e17e0..fc1e5a1 100644 --- a/stdlib/Versions +++ b/stdlib/Versions @@ -90,6 +90,10 @@ libc { # used by new G++ ABI __cxa_atexit; __cxa_finalize; } + GLIBC_2.3 { + # Silent change in SUS. + realpath; + } GLIBC_PRIVATE { # functions which have an additional interface since they are # are cancelable. diff --git a/stdlib/canonicalize.c b/stdlib/canonicalize.c index c859288..3394048 100644 --- a/stdlib/canonicalize.c +++ b/stdlib/canonicalize.c @@ -26,6 +26,8 @@ #include #include +#include + /* 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 * -- cgit v1.1