1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

* include/netinet/ether.h (DECLARE_NSS_PROTOTYPES): New.

* nis/nis_intern.h: Add prototype for __do_niscall3.

	* nis/nss_nis/nis-rpc.c (_nss_nis_setrpcent): Fix declaration to
	match prototype.

	* include/netdb.h (DECLARE_NSS_PROTOTYPES): Reformat.

	* include/rpc/netdb.h (DECLARE_NSS_PROTOTYPES): New.

	* include/aliases.h (DECLARE_NSS_PROTOTYPES): New.
This commit is contained in:
Andreas Jaeger
2000-12-19 09:50:44 +00:00
parent 244cd53119
commit 23bab906b8
6 changed files with 125 additions and 60 deletions

View File

@ -17,4 +17,20 @@ extern int __old_getaliasbyname_r (__const char *__restrict __name,
char *__restrict __buffer, size_t __buflen, char *__restrict __buffer, size_t __buflen,
struct aliasent **__restrict __result); struct aliasent **__restrict __result);
#define DECLARE_NSS_PROTOTYPES(service) \
extern enum nss_status _nss_ ## service ## _setaliasent (void); \
extern enum nss_status _nss_ ## service ## _endaliasent (void); \
extern enum nss_status _nss_ ## service ## _getaliasent_r \
(struct aliasent *alias, char *buffer, size_t buflen, \
int *errnop); \
extern enum nss_status _nss_ ## service ## _getaliasbyname_r \
(const char *name, struct aliasent *alias, \
char *buffer, size_t buflen, int *errnop);
DECLARE_NSS_PROTOTYPES (files)
DECLARE_NSS_PROTOTYPES (nis)
DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
#endif #endif

View File

@ -1 +1,26 @@
#ifndef _NETINET_ETHER_H
#include <inet/netinet/ether.h> #include <inet/netinet/ether.h>
struct etherent;
#define DECLARE_NSS_PROTOTYPES(service) \
extern enum nss_status _nss_ ## service ## _setetherent (void); \
extern enum nss_status _nss_ ## service ## _endetherent (void); \
extern enum nss_status _nss_ ## service ## _getetherent_r \
(struct etherent *result, char *buffer, \
size_t buflen, int *errnop); \
extern enum nss_status _nss_ ## service ## _gethostton_r \
(const char *name, struct etherent *eth, \
char *buffer, size_t buflen, int *errnop); \
extern enum nss_status _nss_ ## service ## _getntohost_r \
(const struct ether_addr *addr, \
struct etherent *eth, \
char *buffer, size_t buflen, int *errnop);
DECLARE_NSS_PROTOTYPES (files)
DECLARE_NSS_PROTOTYPES (nis)
DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
#endif

View File

@ -21,4 +21,24 @@ extern int __getrpcent_r (struct rpcent *__result_buf, char *__buffer,
extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer, extern int __old_getrpcent_r (struct rpcent *__result_buf, char *__buffer,
size_t __buflen, struct rpcent **__result); size_t __buflen, struct rpcent **__result);
#define DECLARE_NSS_PROTOTYPES(service) \
extern enum nss_status _nss_ ## service ## _setrpcent (int); \
extern enum nss_status _nss_ ## service ## _endrpcent (void); \
extern enum nss_status _nss_ ## service ## _getrpcent_r \
(struct rpcent *rpc, char *buffer, size_t buflen, \
int *errnop); \
extern enum nss_status _nss_ ## service ## _getrpcbyname_r \
(const char *name, struct rpcent *rpc, \
char *buffer, size_t buflen, int *errnop); \
extern enum nss_status _nss_ ## service ## _getrpcbynumber_r \
(int number, struct rpcent *rpc, \
char *buffer, size_t buflen, int *errnop);
DECLARE_NSS_PROTOTYPES (files)
DECLARE_NSS_PROTOTYPES (nis)
DECLARE_NSS_PROTOTYPES (nisplus)
#undef DECLARE_NSS_PROTOTYPES
#endif #endif

View File

@ -1,4 +1,4 @@
/* Copyright (c) 1997, 1998, 1999 Free Software Foundation, Inc. /* Copyright (c) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
This file is part of the GNU C Library. This file is part of the GNU C Library.
Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997. Contributed by Thorsten Kukuk <kukuk@suse.de>, 1997.
@ -46,6 +46,10 @@ extern nis_error __do_niscall (const_nis_name name, u_long prog,
xdrproc_t xargs, caddr_t req, xdrproc_t xargs, caddr_t req,
xdrproc_t xres, caddr_t resp, xdrproc_t xres, caddr_t resp,
unsigned int flags, nis_cb *cb); unsigned int flags, nis_cb *cb);
extern nis_error __do_niscall3 (dir_binding *dbp, u_long prog,
xdrproc_t xargs, caddr_t req,
xdrproc_t xres, caddr_t resp,
unsigned int flags, nis_cb *cb);
/* NIS+ callback */ /* NIS+ callback */
extern nis_error __nis_do_callback (struct dir_binding *bptr, extern nis_error __nis_do_callback (struct dir_binding *bptr,

View File

@ -115,7 +115,7 @@ internal_nis_setrpcent (intern_t *intern)
} }
enum nss_status enum nss_status
_nss_nis_setrpcent (void) _nss_nis_setrpcent (int stayopen)
{ {
enum nss_status status; enum nss_status status;