diff options
Diffstat (limited to 'nss')
-rw-r--r-- | nss/getXXbyYY.c | 10 | ||||
-rw-r--r-- | nss/getXXbyYY_r.c | 9 | ||||
-rw-r--r-- | nss/getXXent.c | 8 | ||||
-rw-r--r-- | nss/getXXent_r.c | 7 |
4 files changed, 25 insertions, 9 deletions
diff --git a/nss/getXXbyYY.c b/nss/getXXbyYY.c index 5eb9ee9c87..a99b68f0e2 100644 --- a/nss/getXXbyYY.c +++ b/nss/getXXbyYY.c @@ -46,6 +46,8 @@ Boston, MA 02111-1307, USA. */ #define REENTRANT_NAME APPEND_R (FUNCTION_NAME) #define APPEND_R(name) APPEND_R1 (name) #define APPEND_R1(name) name##_r +#define INTERNAL(name) INTERNAL1 (name) +#define INTERNAL1(name) __##name /* Sometimes we need to store error codes in the `h_errno' variable. */ #ifdef NEED_H_ERRNO @@ -58,8 +60,9 @@ Boston, MA 02111-1307, USA. */ /* Prototype for reentrant version we use here. */ -extern LOOKUP_TYPE *REENTRANT_NAME (ADD_PARAMS, LOOKUP_TYPE *result, - char *buffer, int buflen H_ERRNO_PARM); +extern LOOKUP_TYPE *INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *result, + char *buffer, int buflen + H_ERRNO_PARM); LOOKUP_TYPE * FUNCTION_NAME (ADD_PARAMS) @@ -67,5 +70,6 @@ FUNCTION_NAME (ADD_PARAMS) static LOOKUP_TYPE result; static char buffer[BUFLEN]; - return REENTRANT_NAME (ADD_VARIABLES, &result, buffer, BUFLEN H_ERRNO_VAR); + return INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &result, buffer, + BUFLEN H_ERRNO_VAR); } diff --git a/nss/getXXbyYY_r.c b/nss/getXXbyYY_r.c index 37ad22d045..631fd1e33e 100644 --- a/nss/getXXbyYY_r.c +++ b/nss/getXXbyYY_r.c @@ -47,6 +47,8 @@ Boston, MA 02111-1307, USA. */ #define REENTRANT_NAME APPEND_R (FUNCTION_NAME) #define APPEND_R(name) APPEND_R1 (name) #define APPEND_R1(name) name##_r +#define INTERNAL(name) INTERNAL1 (name) +#define INTERNAL1(name) __##name #define FUNCTION_NAME_STRING STRINGIZE (FUNCTION_NAME) #define REENTRANT_NAME_STRING STRINGIZE (REENTRANT_NAME) @@ -81,8 +83,8 @@ extern int DB_LOOKUP_FCT (service_user **nip, const char *name, void **fctp); LOOKUP_TYPE * -REENTRANT_NAME (ADD_PARAMS, LOOKUP_TYPE *result, char *buffer, int buflen - H_ERRNO_PARM) +INTERNAL (REENTRANT_NAME) (ADD_PARAMS, LOOKUP_TYPE *result, char *buffer, + int buflen H_ERRNO_PARM) { static service_user *startp = NULL; static lookup_function start_fct; @@ -128,3 +130,6 @@ REENTRANT_NAME (ADD_PARAMS, LOOKUP_TYPE *result, char *buffer, int buflen return status == NSS_STATUS_SUCCESS ? result : NULL; } + +#define do_weak_alias(n1, n2) weak_alias ((n1), (n2)) +do_weak_alias (INTERNAL (REENTRANT_NAME), REENTRANT_NAME) diff --git a/nss/getXXent.c b/nss/getXXent.c index fd75979c9d..ecf7eadc4c 100644 --- a/nss/getXXent.c +++ b/nss/getXXent.c @@ -38,6 +38,8 @@ Boston, MA 02111-1307, USA. */ #define REENTRANT_GETNAME APPEND_R (GETFUNC_NAME) #define APPEND_R(name) APPEND_R1 (name) #define APPEND_R1(name) name##_r +#define INTERNAL(name) INTERNAL1 (name) +#define INTERNAL1(name) __##name /* Sometimes we need to store error codes in the `h_errno' variable. */ #ifdef NEED_H_ERRNO @@ -49,8 +51,8 @@ Boston, MA 02111-1307, USA. */ #endif /* Prototype of the reentrant version. */ -LOOKUP_TYPE *REENTRANT_GETNAME (LOOKUP_TYPE *result, char *buffer, - int buflen H_ERRNO_PARM); +LOOKUP_TYPE *INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *result, char *buffer, + int buflen H_ERRNO_PARM); LOOKUP_TYPE * @@ -59,5 +61,5 @@ GETFUNC_NAME (void) static char buffer[BUFLEN]; static LOOKUP_TYPE result; - return REENTRANT_GETNAME (&result, buffer, BUFLEN H_ERRNO_VAR); + return INTERNAL (REENTRANT_GETNAME) (&result, buffer, BUFLEN H_ERRNO_VAR); } diff --git a/nss/getXXent_r.c b/nss/getXXent_r.c index 620eebd1f7..ea391fe094 100644 --- a/nss/getXXent_r.c +++ b/nss/getXXent_r.c @@ -50,6 +50,8 @@ Boston, MA 02111-1307, USA. */ #define REENTRANT_GETNAME APPEND_R (GETFUNC_NAME) #define APPEND_R(name) APPEND_R1 (name) #define APPEND_R1(name) name##_r +#define INTERNAL(name) INTERNAL1 (name) +#define INTERNAL1(name) __##name #define SETFUNC_NAME_STRING STRINGIZE (SETFUNC_NAME) #define GETFUNC_NAME_STRING STRINGIZE (REENTRANT_GETNAME) @@ -186,7 +188,8 @@ ENDFUNC_NAME (void) LOOKUP_TYPE * -REENTRANT_GETNAME (LOOKUP_TYPE *result, char *buffer, int buflen H_ERRNO_PARM) +INTERNAL (REENTRANT_GETNAME) (LOOKUP_TYPE *result, char *buffer, int buflen + H_ERRNO_PARM) { get_function fct; int no_more; @@ -221,3 +224,5 @@ REENTRANT_GETNAME (LOOKUP_TYPE *result, char *buffer, int buflen H_ERRNO_PARM) return status == NSS_STATUS_SUCCESS ? result : NULL; } +#define do_weak_alias(n1, n2) weak_alias (n1, n2) +do_weak_alias (INTERNAL (REENTRANT_GETNAME), REENTRANT_GETNAME) |