diff options
Diffstat (limited to 'nss')
-rw-r--r-- | nss/getXXbyYY_r.c | 27 | ||||
-rw-r--r-- | nss/getXXent_r.c | 28 |
2 files changed, 55 insertions, 0 deletions
diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index ac10f4ea7a..a54ae67bb7 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -208,5 +208,32 @@ done: return status == NSS_STATUS_SUCCESS ? 0 : errno; } +#if defined SHARED && DO_VERSIONING +#define OLD(name) OLD1 (name) +#define OLD1(name) __old_##name + +int +OLD (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *resbuf, char *buffer, + size_t buflen, LOOKUP_TYPE **result H_ERRNO_PARM) +{ + int ret = INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, resbuf, buffer, + buflen, result H_ERRNO_VAR); + + if (ret != 0) + ret = -1; + + return ret; +} + +#define do_symbol_version(real, name, version) \ + symbol_version(real, name, version) +do_symbol_version(OLD (REENTRANT_NAME), REENTRANT_NAME, GLIBC_2.0); + +#define do_default_symbol_version(real, name, version) \ + default_symbol_version(real, name, version) +do_default_symbol_version(INTERNAL (REENTRANT_NAME), REENTRANT_NAME, + GLIBC_2.1.2); +#else #define do_weak_alias(n1, n2) weak_alias (n1, (n2)) do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME) +#endif diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index 57bb99f081..6f6f22ad0b 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -290,5 +290,33 @@ INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen, *result = status == NSS_STATUS_SUCCESS ? resbuf : NULL; return status == NSS_STATUS_SUCCESS ? 0 : errno; } +#if defined SHARED && DO_VERSIONING +#define OLD(name) OLD1 (name) +#define OLD1(name) __old_##name + +int +OLD (REENTRANT_GETNAME) (LOOKUP_TYPE *resbuf, char *buffer, size_t buflen, + LOOKUP_TYPE **result H_ERRNO_PARM) +{ + int ret = INTERNAL (REENTRANT_GETNAME) (resbuf, buffer, buflen, + result H_ERRNO_VAR); + + if (ret != 0) + ret = -1; + + return ret; +} + +#define do_symbol_version(real, name, version) \ + symbol_version(real, name, version) +do_symbol_version(OLD (REENTRANT_GETNAME), REENTRANT_GETNAME, + GLIBC_2.0); + +#define do_default_symbol_version(real, name, version) \ + default_symbol_version(real, name, version) +do_default_symbol_version(INTERNAL (REENTRANT_GETNAME), + REENTRANT_GETNAME, GLIBC_2.1.2); +#else #define do_weak_alias(n1, n2) weak_alias (n1, n2) do_weak_alias (INTERNAL (REENTRANT_GETNAME), REENTRANT_GETNAME) +#endif |