summaryrefslogtreecommitdiff
path: root/nss/nsswitch.h
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-12-08 22:39:54 +0000
committerUlrich Drepper <drepper@redhat.com>2000-12-08 22:39:54 +0000
commit8b80182964bde1fa84333674e454d41e1fa0c8ca (patch)
treedfdb69a6a515ee5b4152036e710c3ea1fb0f96ec /nss/nsswitch.h
parent55f44129526d6bae0595300c03fcd681f83ededb (diff)
Update.
2000-12-05 H.J. Lu <hjl@gnu.org> * nss/Makefile (routines): Add getnssent and getnssent_r. * nss/nsswitch.h (__nss_setent): New internal NSS function. (__nss_endent): Likewise. (__nss_getent_r): Likewise. (__nss_getent): Likewise. * nss/getnssent_r.c: New file. * nss/getnssent.c: New file. * nss/getXXent.c (H_ERRNO_VAR): Updated. (GETFUNC_NAME): Updated to call __nss_getent (). * nss/getXXent_r.c (H_ERRNO_VAR_P): New. (STAYOPEN_TMPVAR): Updated. (STAYOPEN_VAR): Updated. (SETFUNC_NAME): Updated to call __nss_setent (). (ENDFUNC_NAME): Updated to call __nss_endent (). (INTERNAL (REENTRANT_GETNAME)): Updated to call __nss_getent_r ().
Diffstat (limited to 'nss/nsswitch.h')
-rw-r--r--nss/nsswitch.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/nss/nsswitch.h b/nss/nsswitch.h
index c3398d7a7e..76ea8e3c3c 100644
--- a/nss/nsswitch.h
+++ b/nss/nsswitch.h
@@ -130,4 +130,35 @@ int __nss_next (service_user **ni, const char *fct_name, void **fctp,
and return a pointer to this function if successful. */
void *__nss_lookup_function (service_user *ni, const char *fct_name);
+
+typedef int (*db_lookup_function) (service_user **, const char *,
+ void **);
+typedef enum nss_status (*setent_function) (int);
+typedef enum nss_status (*endent_function) (void);
+typedef enum nss_status (*getent_function) (void *, char *, size_t,
+ int *, int *);
+typedef int (*getent_r_function) (void *, char *, size_t,
+ void **result, int *);
+
+extern void __nss_setent (const char *func_name,
+ db_lookup_function lookup_fct,
+ service_user **nip, service_user **startp,
+ service_user **last_nip, int stayon,
+ int *stayon_tmp, int res);
+extern void __nss_endent (const char *func_name,
+ db_lookup_function lookup_fct,
+ service_user **nip, service_user **startp,
+ service_user **last_nip, int res);
+extern int __nss_getent_r (const char *getent_func_name,
+ const char *setent_func_name,
+ db_lookup_function lookup_fct,
+ service_user **nip, service_user **startp,
+ service_user **last_nip, int *stayon_tmp,
+ int res,
+ void *resbuf, char *buffer, size_t buflen,
+ void **result, int *h_errnop);
+extern void *__nss_getent (getent_r_function func,
+ void **resbuf, char **buffer, size_t buflen,
+ size_t *buffer_size, int *h_errnop);
+
#endif /* nsswitch.h */