This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
My last patch was broken - nss_files was wrong. Here's now the
complete patch with all fixes to make glibc compile again.
A few functions, e.g. for ether and rpc, are still not declared but
the majority is declared now.
Please note that dns-network doesn't set herrnop. Uli, can you fix
this, please?
Ok to commit?
Andreas
2000-12-18 Andreas Jaeger <aj@suse.de>
* nss/nss_files/files-network.c (NEED_H_ERRNO): Define.
* include/grp.h (DECLARE_NSS_PROTOTYPES): New.
* include/pwd.h (DECLARE_NSS_PROTOTYPES): New.
* include/netdb.h (DECLARE_NSS_PROTOTYPES): New.
* hesiod/nss_hesiod/hesiod-proto.c (_nss_hesiod_setprotoent): Fix
declaration to match prototype.
* hesiod/nss_hesiod/hesiod-pwd.c (_nss_hesiod_setpwent): Likewise.
* hesiod/nss_hesiod/hesiod-grp.c (_nss_hesiod_setgrent): Likewise.
* hesiod/nss_hesiod/hesiod-service.c (_nss_hesiod_setservent):
Likewise.
* nis/nss_nis/nis-grp.c (_nss_nis_setgrent): Likewise.
* nis/nss_nis/nis-pwd.c (_nss_nis_setpwent): Likewise.
* nis/nss_nis/nis-proto.c (_nss_nis_setprotoent): Likewise.
* nis/nss_nis/nis-service.c (_nss_nis_setservent): Likewise.
(_nss_nis_getservbyport_r): Likewise.
* nis/nss_nis/nis-hosts.c (_nss_nis_sethostent): Likewise.
* nis/nss_nis/nis-spwd.c (_nss_nis_setspent): Likewise.
* nis/nss_nis/nis-network.c (_nss_nis_getnetent_r): Likewise.
(_nss_nis_setnetent): Likewise
* nis/nss_nis/nis-netgrp.c (_nss_nis_setnetgrent): Likewise.
(_nss_nis_endnetgrent): Likewise.
* nis/nss_nisplus/nisplus-netgrp.c (_nss_nisplus_endnetgrent):
Likewise.
(_nss_nisplus_setnetgrent): Likewise.
* nis/nss_nisplus/nisplus-spwd.c (_nss_nisplus_setspent): Likewise.
* nis/nss_nisplus/nisplus-pwd.c (_nss_nisplus_setpwent): Likewise.
* nis/nss_nisplus/nisplus-grp.c (_nss_nisplus_setgrent): Likewise.
* nis/nss_nisplus/nisplus-network.c (_nss_nisplus_setnetent):
Likewise.
* nis/nss_nisplus/nisplus-hosts.c (_nss_nisplus_sethostent):
Likewise.
* nis/nss_nisplus/nisplus-service.c (_nss_nisplus_setservent):
Likewise.
* nis/nss_nisplus/nisplus-proto.c (_nss_nisplus_setprotoent):
Likewise.
* nis/nss_compat/compat-spwd.c (_nss_compat_setspent): Likewise.
* nis/nss_compat/compat-pwd.c (_nss_compat_setpwent): Likewise.
* nis/nss_compat/compat-grp.c (_nss_compat_setgrent): Likewise.
* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Likewise.
* resolv/nss_dns/dns-network.c (_nss_dns_getnetbyname_r): Likewise.
(_nss_dns_getnetbyaddr_r): Likewise.
============================================================
Index: nss/nss_files/files-network.c
--- nss/nss_files/files-network.c 2000/04/01 22:26:38 1.8
+++ nss/nss_files/files-network.c 2000/12/18 13:01:12
@@ -23,6 +23,7 @@
#define ENTNAME netent
#define DATABASE "networks"
+#define NEED_H_ERRNO
struct netent_data {};
============================================================
Index: include/grp.h
--- include/grp.h 1999/11/23 17:20:31 1.6
+++ include/grp.h 2000/12/18 13:01:12
@@ -17,4 +17,29 @@
extern int __getgrnam_r (__const char *__name, struct group *__resultbuf,
char *__buffer, size_t __buflen,
struct group **__result);
+
+#define DECLARE_NSS_PROTOTYPES(service) \
+extern enum nss_status _nss_ ## service ## _setgrent (int); \
+extern enum nss_status _nss_ ## service ## _endgrent (void); \
+extern enum nss_status _nss_ ## service ## _getgrgid_r \
+ (gid_t gid, struct group *grp, char *buffer, \
+ size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _getgrnam_r \
+ (const char *name, struct group *grp, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ##_getgrent_r \
+ (struct group *result, char *buffer, size_t buflen, \
+ int *errnop); \
+extern enum nss_status _nss_ ## service ##_initgroups_dyn \
+ (const char *user, gid_t group, long int *start, \
+ long int *size, gid_t **groupsp, long int limit, \
+ int *errnop);
+
+DECLARE_NSS_PROTOTYPES (compat)
+DECLARE_NSS_PROTOTYPES (files)
+DECLARE_NSS_PROTOTYPES (hesiod)
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
#endif
============================================================
Index: include/pwd.h
--- include/pwd.h 1999/11/23 17:20:31 1.5
+++ include/pwd.h 2000/12/18 13:01:12
@@ -13,4 +13,27 @@
extern int __fgetpwent_r (FILE * __stream, struct passwd *__resultbuf,
char *__buffer, size_t __buflen,
struct passwd **__result);
+
+#include <nss/nss.h>
+#define DECLARE_NSS_PROTOTYPES(service) \
+extern enum nss_status _nss_ ## service ## _setpwent (int); \
+extern enum nss_status _nss_ ## service ## _endpwent (void); \
+extern enum nss_status _nss_ ## service ## _getpwnam_r \
+ (const char *name, struct passwd *pwd, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _getpwuid_r \
+ (uid_t uid, struct passwd *pwd, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ##_getpwent_r \
+ (struct passwd *result, char *buffer, \
+ size_t buflen, int *errnop);
+
+DECLARE_NSS_PROTOTYPES (compat)
+DECLARE_NSS_PROTOTYPES (files)
+DECLARE_NSS_PROTOTYPES (hesiod)
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
+
#endif
============================================================
Index: include/netdb.h
--- include/netdb.h 2000/11/26 09:43:11 1.11
+++ include/netdb.h 2000/12/18 13:01:12
@@ -143,10 +143,81 @@
/* The following declarations and definitions have been removed from
the public header since we don't want people to use them. */
-#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
-#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
-#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
- returned address type. */
+#define AI_V4MAPPED 0x0008 /* IPv4-mapped addresses are acceptable. */
+#define AI_ALL 0x0010 /* Return both IPv4 and IPv6 addresses. */
+#define AI_ADDRCONFIG 0x0020 /* Use configuration of this host to choose
+ returned address type. */
#define AI_DEFAULT (AI_V4MAPPED | AI_ADDRCONFIG)
+
+#include <inet/netgroup.h>
+
+#define DECLARE_NSS_PROTOTYPES(service) \
+extern enum nss_status _nss_ ## service ## _setprotoent (int); \
+extern enum nss_status _nss_ ## service ## _endprotoent (void); \
+extern enum nss_status _nss_ ## service ## _getprotoent_r \
+ (struct protoent *proto, char *buffer, size_t buflen, \
+ int *errnop); \
+extern enum nss_status _nss_ ## service ## _getprotobyname_r \
+ (const char *name, struct protoent *proto, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _getprotobynumber_r \
+ (int number, struct protoent *proto, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _sethostent (int); \
+extern enum nss_status _nss_ ## service ## _endhostent (void); \
+extern enum nss_status _nss_ ## service ## _gethostent_r \
+ (struct hostent *host, char *buffer, size_t buflen, \
+ int *errnop, int *h_errnop); \
+extern enum nss_status _nss_ ## service ## _gethostbyname2_r \
+ (const char *name, int af, struct hostent *host, \
+ char *buffer, size_t buflen, int *errnop, \
+ int *h_errnop); \
+extern enum nss_status _nss_ ## service ## _gethostbyname_r \
+ (const char *name, struct hostent *host, char *buffer, \
+ size_t buflen, int *errnop, int *h_errnop); \
+extern enum nss_status _nss_ ## service ## _gethostbyaddr_r \
+ (const void *addr, socklen_t addrlen, int af, \
+ struct hostent *host, char *buffer, size_t buflen, \
+ int *errnop, int *h_errnop); \
+extern enum nss_status _nss_ ## service ## _setservent (int); \
+extern enum nss_status _nss_ ## service ## _endservent (void); \
+extern enum nss_status _nss_ ## service ## _getservent_r \
+ (struct servent *serv, char *buffer, size_t buflen, \
+ int *errnop); \
+extern enum nss_status _nss_ ## service ## _getservbyname_r \
+ (const char *name, const char *protocol, \
+ struct servent *serv, char *buffer, size_t buflen, \
+ int *errnop); \
+extern enum nss_status _nss_ ## service ## _getservbyport_r \
+ (int port, const char *protocol, struct servent *serv, \
+ char *buffer, size_t buflen, int *errnop); \
+extern enum nss_status _nss_ ## service ## _setnetgrent \
+ (const char *group, struct __netgrent *result); \
+extern enum nss_status _nss_ ## service ## _endnetgrent \
+ (struct __netgrent *result); \
+extern enum nss_status _nss_ ## service ##_getnetgrent_r \
+ (struct __netgrent *result, char *buffer, \
+ size_t buflen, int *errnop); \
+extern enum nss_status _nss_## service ##_setnetent (int stayopen); \
+extern enum nss_status _nss_ ## service ## _endnetent (void); \
+extern enum nss_status _nss_## service ##_getnetent_r \
+ (struct netent *net, char *buffer, size_t buflen, \
+ int *errnop, int *herrnop); \
+extern enum nss_status _nss_## service ##_getnetbyname_r \
+ (const char *name, struct netent *net, char *buffer, \
+ size_t buflen, int *errnop, int *herrnop); \
+extern enum nss_status _nss_## service ##_getnetbyaddr_r \
+ (uint32_t addr, int type, struct netent *net, \
+ char *buffer, size_t buflen, int *errnop, \
+ int *herrnop);
+
+DECLARE_NSS_PROTOTYPES (compat)
+DECLARE_NSS_PROTOTYPES (dns)
+DECLARE_NSS_PROTOTYPES (files)
+DECLARE_NSS_PROTOTYPES (hesiod)
+DECLARE_NSS_PROTOTYPES (nis)
+DECLARE_NSS_PROTOTYPES (nisplus)
+
+#undef DECLARE_NSS_PROTOTYPES
#endif /* !_NETDB_H */
============================================================
Index: hesiod/nss_hesiod/hesiod-proto.c
--- hesiod/nss_hesiod/hesiod-proto.c 2000/07/21 01:35:34 1.1
+++ hesiod/nss_hesiod/hesiod-proto.c 2000/12/18 13:01:12
@@ -46,7 +46,7 @@
)
enum nss_status
-_nss_hesiod_setprotoent (void)
+_nss_hesiod_setprotoent (int stayopen)
{
return NSS_STATUS_SUCCESS;
}
============================================================
Index: hesiod/nss_hesiod/hesiod-pwd.c
--- hesiod/nss_hesiod/hesiod-pwd.c 2000/07/21 01:33:54 1.3
+++ hesiod/nss_hesiod/hesiod-pwd.c 2000/12/18 13:01:12
@@ -34,7 +34,7 @@
#include <nss/nss_files/files-parse.c>
enum nss_status
-_nss_hesiod_setpwent (void)
+_nss_hesiod_setpwent (int stayopen)
{
return NSS_STATUS_SUCCESS;
}
============================================================
Index: hesiod/nss_hesiod/hesiod-grp.c
--- hesiod/nss_hesiod/hesiod-grp.c 2000/10/20 06:33:30 1.8
+++ hesiod/nss_hesiod/hesiod-grp.c 2000/12/18 13:01:12
@@ -36,7 +36,7 @@
#include <nss/nss_files/files-parse.c>
enum nss_status
-_nss_hesiod_setgrent (void)
+_nss_hesiod_setgrent (int stayopen)
{
return NSS_STATUS_SUCCESS;
}
============================================================
Index: hesiod/nss_hesiod/hesiod-service.c
--- hesiod/nss_hesiod/hesiod-service.c 2000/07/21 01:35:11 1.3
+++ hesiod/nss_hesiod/hesiod-service.c 2000/12/18 13:01:12
@@ -47,7 +47,7 @@
)
enum nss_status
-_nss_hesiod_setservent (void)
+_nss_hesiod_setservent (int stayopen)
{
return NSS_STATUS_SUCCESS;
}
============================================================
Index: nis/nss_nis/nis-grp.c
--- nis/nss_nis/nis-grp.c 1999/12/18 19:27:07 1.11
+++ nis/nss_nis/nis-grp.c 2000/12/18 13:01:12
@@ -42,7 +42,7 @@
static int oldkeylen = 0;
enum nss_status
-_nss_nis_setgrent (void)
+_nss_nis_setgrent (int stayopen)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nis/nis-pwd.c
--- nis/nss_nis/nis-pwd.c 1998/09/14 11:36:33 1.12
+++ nis/nss_nis/nis-pwd.c 2000/12/18 13:01:13
@@ -42,7 +42,7 @@
static int oldkeylen = 0;
enum nss_status
-_nss_nis_setpwent (void)
+_nss_nis_setpwent (int stayopen)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nis/nis-proto.c
--- nis/nss_nis/nis-proto.c 2000/03/17 18:34:12 1.14
+++ nis/nss_nis/nis-proto.c 2000/12/18 13:01:13
@@ -106,7 +106,7 @@
}
enum nss_status
-_nss_nis_setprotoent (void)
+_nss_nis_setprotoent (int stayopen)
{
enum nss_status status;
============================================================
Index: nis/nss_nis/nis-service.c
--- nis/nss_nis/nis-service.c 2000/03/26 20:00:44 1.16
+++ nis/nss_nis/nis-service.c 2000/12/18 13:01:13
@@ -115,7 +115,7 @@
return status;
}
enum nss_status
-_nss_nis_setservent (void)
+_nss_nis_setservent (int stayopen)
{
enum nss_status status;
@@ -207,7 +207,7 @@
}
enum nss_status
-_nss_nis_getservbyname_r (const char *name, char *protocol,
+_nss_nis_getservbyname_r (const char *name, const char *protocol,
struct servent *serv, char *buffer, size_t buflen,
int *errnop)
{
@@ -312,8 +312,9 @@
}
enum nss_status
-_nss_nis_getservbyport_r (int port, char *protocol, struct servent *serv,
- char *buffer, size_t buflen, int *errnop)
+_nss_nis_getservbyport_r (int port, const char *protocol,
+ struct servent *serv, char *buffer,
+ size_t buflen, int *errnop)
{
intern_t data = { NULL, NULL };
enum nss_status status;
============================================================
Index: nis/nss_nis/nis-hosts.c
--- nis/nss_nis/nis-hosts.c 2000/08/01 16:03:02 1.20
+++ nis/nss_nis/nis-hosts.c 2000/12/18 13:01:13
@@ -99,7 +99,7 @@
static int oldkeylen = 0;
enum nss_status
-_nss_nis_sethostent (void)
+_nss_nis_sethostent (int stayopen)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nis/nis-spwd.c
--- nis/nss_nis/nis-spwd.c 1998/08/18 23:24:56 1.9
+++ nis/nss_nis/nis-spwd.c 2000/12/18 13:01:13
@@ -42,7 +42,7 @@
static int oldkeylen = 0;
enum nss_status
-_nss_nis_setspent (void)
+_nss_nis_setspent (int stayopen)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nis/nis-network.c
--- nis/nss_nis/nis-network.c 2000/04/01 22:26:20 1.12
+++ nis/nss_nis/nis-network.c 2000/12/18 13:01:13
@@ -43,7 +43,7 @@
static int oldkeylen = 0;
enum nss_status
-_nss_nis_setnetent (void)
+_nss_nis_setnetent (int stayopen)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nis/nis-netgrp.c
--- nis/nss_nis/nis-netgrp.c 2000/03/17 18:34:12 1.6
+++ nis/nss_nis/nis-netgrp.c 2000/12/18 13:01:13
@@ -43,7 +43,7 @@
char *buffer, size_t buflen, int *errnop);
enum nss_status
-_nss_nis_setnetgrent (char *group)
+_nss_nis_setnetgrent (const char *group, struct __netgrent *dummy)
{
char *domain;
char *result;
@@ -92,7 +92,7 @@
enum nss_status
-_nss_nis_endnetgrent (void)
+_nss_nis_endnetgrent (struct __netgrent *dummy)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nisplus/nisplus-netgrp.c
--- nis/nss_nisplus/nisplus-netgrp.c 1997/12/08 02:40:03 1.9
+++ nis/nss_nisplus/nisplus-netgrp.c 2000/12/18 13:01:13
@@ -129,8 +129,7 @@
}
enum nss_status
-_nss_nisplus_setnetgrent (char *group)
-
+_nss_nisplus_setnetgrent (const char *group, struct __netgrent *dummy)
{
enum nss_status status;
char buf[strlen (group) + 30];
@@ -169,7 +168,7 @@
}
enum nss_status
-_nss_nisplus_endnetgrent (void)
+_nss_nisplus_endnetgrent (struct __netgrent *dummy)
{
__libc_lock_lock (lock);
============================================================
Index: nis/nss_nisplus/nisplus-spwd.c
--- nis/nss_nisplus/nisplus-spwd.c 1998/01/24 13:45:44 1.12
+++ nis/nss_nisplus/nisplus-spwd.c 2000/12/18 13:01:13
@@ -55,7 +55,7 @@
}
enum nss_status
-_nss_nisplus_setspent (void)
+_nss_nisplus_setspent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
int err;
============================================================
Index: nis/nss_nisplus/nisplus-pwd.c
--- nis/nss_nisplus/nisplus-pwd.c 1999/03/08 11:44:53 1.11
+++ nis/nss_nisplus/nisplus-pwd.c 2000/12/18 13:01:13
@@ -56,7 +56,7 @@
enum nss_status
-_nss_nisplus_setpwent (void)
+_nss_nisplus_setpwent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
int err;
============================================================
Index: nis/nss_nisplus/nisplus-grp.c
--- nis/nss_nisplus/nisplus-grp.c 1998/01/24 13:45:36 1.10
+++ nis/nss_nisplus/nisplus-grp.c 2000/12/18 13:01:13
@@ -82,7 +82,7 @@
}
enum nss_status
-_nss_nisplus_setgrent (void)
+_nss_nisplus_setgrent (int stayopen)
{
enum nss_status status;
============================================================
Index: nis/nss_nisplus/nisplus-network.c
--- nis/nss_nisplus/nisplus-network.c 2000/04/01 22:26:26 1.14
+++ nis/nss_nisplus/nisplus-network.c 2000/12/18 13:01:13
@@ -161,7 +161,7 @@
}
enum nss_status
-_nss_nisplus_setnetent (void)
+_nss_nisplus_setnetent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
int err;
============================================================
Index: nis/nss_nisplus/nisplus-hosts.c
--- nis/nss_nisplus/nisplus-hosts.c 2000/08/01 16:03:02 1.22
+++ nis/nss_nisplus/nisplus-hosts.c 2000/12/18 13:01:14
@@ -197,7 +197,7 @@
}
enum nss_status
-_nss_nisplus_sethostent (void)
+_nss_nisplus_sethostent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
int err;
============================================================
Index: nis/nss_nisplus/nisplus-service.c
--- nis/nss_nisplus/nisplus-service.c 1999/08/03 17:17:14 1.16
+++ nis/nss_nisplus/nisplus-service.c 2000/12/18 13:01:14
@@ -165,7 +165,7 @@
enum nss_status
-_nss_nisplus_setservent (void)
+_nss_nisplus_setservent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
int err;
============================================================
Index: nis/nss_nisplus/nisplus-proto.c
--- nis/nss_nisplus/nisplus-proto.c 1998/02/16 17:40:21 1.14
+++ nis/nss_nisplus/nisplus-proto.c 2000/12/18 13:01:14
@@ -158,7 +158,7 @@
}
enum nss_status
-_nss_nisplus_setprotoent (void)
+_nss_nisplus_setprotoent (int stayopen)
{
enum nss_status status = NSS_STATUS_SUCCESS;
============================================================
Index: nis/nss_compat/compat-grp.c
--- nis/nss_compat/compat-grp.c 1999/12/18 19:26:57 1.19
+++ nis/nss_compat/compat-grp.c 2000/12/18 13:01:14
@@ -169,7 +169,7 @@
enum nss_status
-_nss_compat_setgrent (void)
+_nss_compat_setgrent (int stayopen)
{
enum nss_status result;
@@ -543,7 +543,7 @@
{
enum nss_status status;
- /* Store the group in the blacklist for the "+" at the end of
+ /* Store the group in the blacklist for the "+" at the end of
/etc/group */
blacklist_store_name (&result->gr_name[1], ent);
status = getgrnam_plusgroup (&result->gr_name[1], result, buffer,
============================================================
Index: nis/nss_compat/compat-pwd.c
--- nis/nss_compat/compat-pwd.c 1999/12/10 04:34:48 1.24
+++ nis/nss_compat/compat-pwd.c 2000/12/18 13:01:15
@@ -327,7 +327,7 @@
enum nss_status
-_nss_compat_setpwent (void)
+_nss_compat_setpwent (int stayopen)
{
enum nss_status result;
============================================================
Index: nis/nss_compat/compat-spwd.c
--- nis/nss_compat/compat-spwd.c 1999/12/18 19:26:57 1.19
+++ nis/nss_compat/compat-spwd.c 2000/12/18 13:01:15
@@ -227,7 +227,7 @@
enum nss_status
-_nss_compat_setspent (void)
+_nss_compat_setspent (int stayopen)
{
enum nss_status result;
@@ -484,7 +484,7 @@
if (parse_res)
{
- /* Store the User in the blacklist for the "+" at the end of
+ /* Store the User in the blacklist for the "+" at the end of
/etc/passwd */
blacklist_store_name (result->sp_namp, ent);
copy_spwd_changes (result, &ent->pwd, p2, p2len);
@@ -844,7 +844,7 @@
{
/* XXX Do not use fixed length buffers. */
char buf2[1024];
- char *user, *host, *domain;
+ char *user, *host, *domain;
struct __netgrent netgrdata;
bzero (&netgrdata, sizeof (struct __netgrent));
============================================================
Index: resolv/nss_dns/dns-host.c
--- resolv/nss_dns/dns-host.c 2000/12/17 17:06:32 1.25
+++ resolv/nss_dns/dns-host.c 2000/12/18 13:01:16
@@ -215,7 +215,7 @@
enum nss_status
-_nss_dns_gethostbyaddr_r (const char *addr, size_t len, int af,
+_nss_dns_gethostbyaddr_r (const void *addr, socklen_t len, int af,
struct hostent *result, char *buffer, size_t buflen,
int *errnop, int *h_errnop)
{
============================================================
Index: resolv/nss_dns/dns-network.c
--- resolv/nss_dns/dns-network.c 1999/12/04 18:04:31 1.8
+++ resolv/nss_dns/dns-network.c 2000/12/18 13:01:16
@@ -106,7 +106,8 @@
enum nss_status
_nss_dns_getnetbyname_r (const char *name, struct netent *result,
- char *buffer, size_t buflen, int *errnop)
+ char *buffer, size_t buflen, int *errnop,
+ int *herrnop)
{
/* Return entry for network with NAME. */
querybuf net_buffer;
@@ -134,8 +135,9 @@
enum nss_status
-_nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
- char *buffer, size_t buflen, int *errnop)
+_nss_dns_getnetbyaddr_r (uint32_t net, int type, struct netent *result,
+ char *buffer, size_t buflen, int *errnop,
+ int *herrnop)
{
/* Return entry for network with NAME. */
enum nss_status status;
@@ -151,7 +153,7 @@
if ((_res.options & RES_INIT) == 0 && __res_ninit (&_res) == -1)
return NSS_STATUS_UNAVAIL;
-
+
net2 = (u_int32_t) net;
for (cnt = 4; net2 != 0; net2 >>= 8)
net_bytes[--cnt] = net2 & 0xff;
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |