]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Update.
authorAndreas Jaeger <aj@suse.de>
Mon, 18 Dec 2000 16:40:40 +0000 (16:40 +0000)
committerAndreas Jaeger <aj@suse.de>
Mon, 18 Dec 2000 16:40:40 +0000 (16:40 +0000)
2000-12-18  Andreas Jaeger  <aj@suse.de>

* test-skeleton.c: Use temp_name_list instead of temp_name_list to
avoid collision with name_list from inet/netgroup.h.

* 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.
* include/shadow.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.

32 files changed:
ChangeLog
hesiod/nss_hesiod/hesiod-grp.c
hesiod/nss_hesiod/hesiod-proto.c
hesiod/nss_hesiod/hesiod-pwd.c
hesiod/nss_hesiod/hesiod-service.c
include/grp.h
include/netdb.h
include/pwd.h
include/shadow.h
nis/nss_compat/compat-grp.c
nis/nss_compat/compat-pwd.c
nis/nss_compat/compat-spwd.c
nis/nss_nis/nis-grp.c
nis/nss_nis/nis-hosts.c
nis/nss_nis/nis-netgrp.c
nis/nss_nis/nis-network.c
nis/nss_nis/nis-proto.c
nis/nss_nis/nis-pwd.c
nis/nss_nis/nis-service.c
nis/nss_nis/nis-spwd.c
nis/nss_nisplus/nisplus-grp.c
nis/nss_nisplus/nisplus-hosts.c
nis/nss_nisplus/nisplus-netgrp.c
nis/nss_nisplus/nisplus-network.c
nis/nss_nisplus/nisplus-proto.c
nis/nss_nisplus/nisplus-pwd.c
nis/nss_nisplus/nisplus-service.c
nis/nss_nisplus/nisplus-spwd.c
nss/nss_files/files-network.c
resolv/nss_dns/dns-host.c
resolv/nss_dns/dns-network.c
test-skeleton.c

index 78df56a34e91f835a2d2e508eaeaae5355dbec5f..5c03ecb9e1922d6287d6119444959d99381614b5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,53 @@
+2000-12-18  Andreas Jaeger  <aj@suse.de>
+
+       * test-skeleton.c: Use temp_name_list instead of temp_name_list to
+       avoid collision with name_list from inet/netgroup.h.
+
+       * 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.
+       * include/shadow.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.
+
 2000-12-17  Andreas Jaeger  <aj@suse.de>
 
        * sysdeps/generic/k_sinl.c (__kernel_sinl): Fix functions
index cb7c0870e2b923080936a8a7cf03f2be3e395e83..b3c5888beed36a6b828a14d37f92d9e7718f36d5 100644 (file)
@@ -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 d77e8d9134c00f88f81e4a2873a8e48cdbe7d037..5910ddde63c89be014251a875b4b9d066deff6db 100644 (file)
@@ -46,7 +46,7 @@ LINE_PARSER
  )
 
 enum nss_status
-_nss_hesiod_setprotoent (void)
+_nss_hesiod_setprotoent (int stayopen)
 {
   return NSS_STATUS_SUCCESS;
 }
index b7d2dd5c0980bc34bd6be3d0df666a5773d92dea..1a962b982cd7790ff3179797d5b71c4fa150cfdf 100644 (file)
@@ -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 8faea3aa5d69b7ddd0df3d42e0407aed09545b1a..77f1be64961d3cddb11ab761f6ed7a814ed599bb 100644 (file)
@@ -47,7 +47,7 @@ LINE_PARSER
  )
 
 enum nss_status
-_nss_hesiod_setservent (void)
+_nss_hesiod_setservent (int stayopen)
 {
   return NSS_STATUS_SUCCESS;
 }
index 824b1648c225f95df975e265ad739fe4607fd96b..bb5a0408b56e69aaac7ccfa011dd3cc81776d323 100644 (file)
@@ -17,4 +17,29 @@ extern int __getgrgid_r (__gid_t __gid, struct group *__resultbuf,
 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 6a60d4ec8cc38b174900f23aa9f37e13beeb976c..8c861d48cf39059d439df1db9c455b50e51b1fdb 100644 (file)
@@ -143,10 +143,81 @@ extern int ruserpass (const char *host, const char **aname,
 /* 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 f91622840a357a782824e0b672e88220f64329a9..25656ef28141ae63c353a8ee99127e622ee34942 100644 (file)
@@ -13,4 +13,27 @@ extern int __getpwnam_r (__const char *__name, struct passwd *__resultbuf,
 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 b7d49f7cfc007e90ef51f071850820ae49728193..5bbaac3543a0f2be3b87394d6ac68dc3f670e911 100644 (file)
@@ -15,4 +15,24 @@ extern int __fgetspent_r (FILE *__stream, struct spwd *__result_buf,
                          struct spwd **__result);
 extern int __lckpwdf (void);
 extern int __ulckpwdf (void);
+
+#define DECLARE_NSS_PROTOTYPES(service)                                        \
+extern enum nss_status _nss_ ## service ## _setspent (int);            \
+extern enum nss_status _nss_ ## service ## _endspent (void);           \
+extern enum nss_status _nss_ ## service ## _getspent_r                 \
+                       (struct spwd *pwd, char *buffer, size_t buflen, \
+                       int *errnop);                                   \
+extern enum nss_status _nss_ ## service ## _getspnam_r                 \
+                       (const char *name, struct spwd *pwd,            \
+                       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 2de46088df9f82e2edf25f49e287f9b44c84c335..d2fec68cc362ed2964ee2f7f5c79e7d8c0fd9e92 100644 (file)
@@ -169,7 +169,7 @@ internal_setgrent (ent_t *ent)
 
 
 enum nss_status
-_nss_compat_setgrent (void)
+_nss_compat_setgrent (int stayopen)
 {
   enum nss_status result;
 
@@ -543,7 +543,7 @@ getgrent_next_file (struct group *result, ent_t *ent,
        {
           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 cb2f19482df0485d03d858f7e5edd6d1def34776..8540f5563a761dcec371aa20d71581cb1714b268 100644 (file)
@@ -327,7 +327,7 @@ internal_setpwent (ent_t *ent)
 
 
 enum nss_status
-_nss_compat_setpwent (void)
+_nss_compat_setpwent (int stayopen)
 {
   enum nss_status result;
 
index f254fadf5c80947e1cc199c4684972ab07acf995..e184d79e6d892381b2dc939af26232ff250acc37 100644 (file)
@@ -227,7 +227,7 @@ internal_setspent (ent_t *ent)
 
 
 enum nss_status
-_nss_compat_setspent (void)
+_nss_compat_setspent (int stayopen)
 {
   enum nss_status result;
 
@@ -484,7 +484,7 @@ getspent_next_nisplus_netgr (const char *name, struct spwd *result,
 
       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 @@ getspent_next_file (struct spwd *result, ent_t *ent,
        {
          /* 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 62e6b475b7f8f90f618fc5c3b07cc011b107e198..72cf1b27479f6581ce47556e0a4a96523d69b365 100644 (file)
@@ -42,7 +42,7 @@ static char *oldkey = NULL;
 static int oldkeylen = 0;
 
 enum nss_status
-_nss_nis_setgrent (void)
+_nss_nis_setgrent (int stayopen)
 {
   __libc_lock_lock (lock);
 
index 58136f2b269b43bd6c9b49d5524bf1c03a3662f3..303cd245c38af936515cc1cd8dee03b43ad4a31f 100644 (file)
@@ -99,7 +99,7 @@ static char *oldkey = NULL;
 static int oldkeylen = 0;
 
 enum nss_status
-_nss_nis_sethostent (void)
+_nss_nis_sethostent (int stayopen)
 {
   __libc_lock_lock (lock);
 
index 71f7b6e4a69ea27d7b0826092b1305c558f22730..e39c282b8b88aecf1181ceb2676809a2a4e51208 100644 (file)
@@ -43,7 +43,7 @@ _nss_netgroup_parseline (char **cursor, struct __netgrent *result,
                         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 @@ _nss_nis_setnetgrent (char *group)
 
 
 enum nss_status
-_nss_nis_endnetgrent (void)
+_nss_nis_endnetgrent (struct __netgrent *dummy)
 {
   __libc_lock_lock (lock);
 
index cae0b773b88ca9aa93daf89f406de0dc6d8c674b..ca02f019025538d4c0aed468243702fd37bd90a1 100644 (file)
@@ -43,7 +43,7 @@ static char *oldkey = NULL;
 static int oldkeylen = 0;
 
 enum nss_status
-_nss_nis_setnetent (void)
+_nss_nis_setnetent (int stayopen)
 {
   __libc_lock_lock (lock);
 
index 9b457ffe8ad2ed781779897c12530074066b7d94..33286df53ac88944fee1e30157b6628b98a1d31c 100644 (file)
@@ -106,7 +106,7 @@ internal_nis_setprotoent (void)
 }
 
 enum nss_status
-_nss_nis_setprotoent (void)
+_nss_nis_setprotoent (int stayopen)
 {
   enum nss_status status;
 
index 0a337bb9e7651ae04f0da110f1044a6e6af84f8d..b818f08f0540876ccef857b902882bc5ca6387a2 100644 (file)
@@ -42,7 +42,7 @@ static char *oldkey = NULL;
 static int oldkeylen = 0;
 
 enum nss_status
-_nss_nis_setpwent (void)
+_nss_nis_setpwent (int stayopen)
 {
   __libc_lock_lock (lock);
 
index 12ae1c6151467a72daf155b1bff9672c28e40fcd..ea1e06eab38e60f9fe4f13dc4f6ad1e6d7638873 100644 (file)
@@ -115,7 +115,7 @@ internal_nis_setservent (intern_t *intern)
   return status;
 }
 enum nss_status
-_nss_nis_setservent (void)
+_nss_nis_setservent (int stayopen)
 {
   enum nss_status status;
 
@@ -207,7 +207,7 @@ _nss_nis_getservent_r (struct servent *serv, char *buffer, size_t buflen,
 }
 
 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 @@ _nss_nis_getservbyname_r (const char *name, char *protocol,
 }
 
 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 37ea2f9dbf9cf1d14de134357561a42204e4a44b..d91f624db6147686d2457a0d753898c32fe5164a 100644 (file)
@@ -42,7 +42,7 @@ static char *oldkey = NULL;
 static int oldkeylen = 0;
 
 enum nss_status
-_nss_nis_setspent (void)
+_nss_nis_setspent (int stayopen)
 {
   __libc_lock_lock (lock);
 
index d014c8b119397cb38c70a19d99d5a5798f963655..662d205acde276a37b6d0473156992978079dffa 100644 (file)
@@ -82,7 +82,7 @@ internal_setgrent (void)
 }
 
 enum nss_status
-_nss_nisplus_setgrent (void)
+_nss_nisplus_setgrent (int stayopen)
 {
   enum nss_status status;
 
index 8f723f3d52bd2067bf8a4bfe2ab1c584acad4265..b2cb7a0f65036c4e7d6c72294862036a0f851270 100644 (file)
@@ -197,7 +197,7 @@ _nss_create_tablename (int *errnop)
 }
 
 enum nss_status
-_nss_nisplus_sethostent (void)
+_nss_nisplus_sethostent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
index 5d5b7272921e36c32cdbbb49c841275234e8f7a5..1247963f29bbaf3000d70d729ea8d079bc80ec0a 100644 (file)
@@ -129,8 +129,7 @@ _nss_nisplus_parse_netgroup (struct __netgrent *result, char *buffer,
 }
 
 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 @@ _nss_nisplus_setnetgrent (char *group)
 }
 
 enum nss_status
-_nss_nisplus_endnetgrent (void)
+_nss_nisplus_endnetgrent (struct __netgrent *dummy)
 {
   __libc_lock_lock (lock);
 
index 4b2339baa22ca38482a2a33e47e5cbb212c9e718..adfb3c18e5ff0b6c7857346233aca7951cd49c00 100644 (file)
@@ -161,7 +161,7 @@ _nss_create_tablename (int *errnop)
 }
 
 enum nss_status
-_nss_nisplus_setnetent (void)
+_nss_nisplus_setnetent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
index d121b2f83c7699f2074cef46bbb553ea9f7ab22a..984530dcddfd4246379f8631617b64da82a8eb79 100644 (file)
@@ -158,7 +158,7 @@ _nss_create_tablename (int *errnop)
 }
 
 enum nss_status
-_nss_nisplus_setprotoent (void)
+_nss_nisplus_setprotoent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
 
index 194b97ff656e92989df8126d9cff91fcc8107970..3ead9cda0da57219c1a8e4cf14c537b48384aeaf 100644 (file)
@@ -56,7 +56,7 @@ _nss_create_tablename (int *errnop)
 
 
 enum nss_status
-_nss_nisplus_setpwent (void)
+_nss_nisplus_setpwent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
index 36bf25a22a54a6264c195d8110a4685dff0d6ea5..f3815344f674d4a35bf05d10c48533550a212648 100644 (file)
@@ -165,7 +165,7 @@ _nss_create_tablename (int *errnop)
 
 
 enum nss_status
-_nss_nisplus_setservent (void)
+_nss_nisplus_setservent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
index 094f56d2552d3ccbdad322a338149c14a4af49ff..f8a8a5a3c2ef47c1971e4db881f44447b738b34b 100644 (file)
@@ -55,7 +55,7 @@ _nss_create_tablename (int *errnop)
 }
 
 enum nss_status
-_nss_nisplus_setspent (void)
+_nss_nisplus_setspent (int stayopen)
 {
   enum nss_status status = NSS_STATUS_SUCCESS;
   int err;
index 3b1fec9724f00a670a94dcc72feb3d83dd521936..5f149cf4b9110d45b75c4cfc45c5a6dfb3a05103 100644 (file)
@@ -23,6 +23,7 @@
 
 #define ENTNAME                netent
 #define DATABASE       "networks"
+#define NEED_H_ERRNO
 
 struct netent_data {};
 
index 5ac87c5a5e37c8852c823c25529b140d20de2894..9d37452799de46cdc676ae01d307d61e13b005b6 100644 (file)
@@ -215,7 +215,7 @@ _nss_dns_gethostbyname_r (const char *name, struct hostent *result,
 
 
 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 b1948521977fbf2bc03e2b5e5ef26a9f17052e73..623ebe47c2dd6896b426c47c31605da1577504c6 100644 (file)
@@ -106,7 +106,8 @@ static enum nss_status getanswer_r (const querybuf *answer, int anslen,
 
 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 @@ _nss_dns_getnetbyname_r (const char *name, struct netent *result,
 
 
 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 @@ _nss_dns_getnetbyaddr_r (long net, int type, struct netent *result,
 
   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;
index 2069bfca281f5d2fa19ebe53d273ce858a659dbf..9126be0dbed4ddf27a813321e551a8426ded020a 100644 (file)
@@ -55,24 +55,25 @@ static int pid;
 static const char *test_dir;
 
 /* List of temporary files.  */
-struct name_list
+struct temp_name_list
 {
   struct qelem q;
   const char *name;
-} *name_list;
+} *temp_name_list;
 
 /* Add temporary files in list.  */
 static void
 add_temp_file (const char *name)
 {
-  struct name_list *newp = (struct name_list *) calloc (sizeof (*newp), 1);
+  struct temp_name_list *newp
+    = (struct temp_name_list *) calloc (sizeof (*newp), 1);
   if (newp != NULL)
     {
       newp->name = name;
-      if (name_list == NULL)
-       name_list = (struct name_list *) &newp->q;
+      if (temp_name_list == NULL)
+       temp_name_list = (struct temp_name_list *) &newp->q;
       else
-       insque (newp, name_list);
+       insque (newp, temp_name_list);
     }
 }
 
@@ -80,10 +81,10 @@ add_temp_file (const char *name)
 static void
 delete_temp_files (void)
 {
-  while (name_list != NULL)
+  while (temp_name_list != NULL)
     {
-      remove (name_list->name);
-      name_list = (struct name_list *) name_list->q.q_forw;
+      remove (temp_name_list->name);
+      temp_name_list = (struct temp_name_list *) temp_name_list->q.q_forw;
     }
 }