summaryrefslogtreecommitdiff
path: root/resolv
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-04-01 22:30:22 +0000
committerUlrich Drepper <drepper@redhat.com>2000-04-01 22:30:22 +0000
commit9b48fa9b416094acd0f25a605c768f6cf3798f71 (patch)
treeaafe8a96e7427e08a1468e76489e7b5c61a14c9e /resolv
parent4380ef5e29eb219706a725848c4e704762a58708 (diff)
Update.
* include/netdb.h: Change type of first parameter of __getnetbyaddr_r. * inet/getnetbyad.c: Likewise. * inet/getnetbyad_r.c: Likewise. * nis/nss_nis/nis-network.c: Likewise. * nis/nssplus_nis/nisplus-network.c: Likewise. * nss/nss_files/files-network.c: Likewise. * resolv/netdb.h: Define uint32_t if not already happened. Include bits/netdb.h. Remove definition of struct netent. Change type of first parameter of getnetbyaddr_r and getnetbyaddr. * sysdeps/generic/stdint.h: Allow definition of uint32_t elsewhere. * sysdeps/generic/bits/netdb.h: New file. * sysdeps/unix/sysv/linux/alpha/bits/netdb.h: New file.
Diffstat (limited to 'resolv')
-rw-r--r--resolv/netdb.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/resolv/netdb.h b/resolv/netdb.h
index 508e7c4692..50420c3e44 100644
--- a/resolv/netdb.h
+++ b/resolv/netdb.h
@@ -32,6 +32,13 @@
#define __need_size_t
#include <stddef.h>
+#ifndef __uint32_t_defined
+typedef unsigned int uint32_t;
+# define __uint32_t_defined
+#endif
+
+#include <bits/netdb.h>
+
/* Absolute file name for network data base files. */
#define _PATH_HEQUIV "/etc/hosts.equiv"
#define _PATH_HOSTS "/etc/hosts"
@@ -184,17 +191,6 @@ extern int gethostbyname2_r (__const char *__restrict __name, int __af,
#endif /* misc */
-/* Description of data base entry for a single network. NOTE: here a
- poor assumption is made. The network number is expected to fit
- into an unsigned long int variable. */
-struct netent
-{
- char *n_name; /* Official name of network. */
- char **n_aliases; /* Alias list. */
- int n_addrtype; /* Net address type. */
- unsigned long int n_net; /* Network number. */
-};
-
/* Open network data base files and mark them as staying open even
after a later search if STAY_OPEN is non-zero. */
extern void setnetent (int __stay_open) __THROW;
@@ -208,7 +204,7 @@ extern struct netent *getnetent (void) __THROW;
/* Return entry from network data base which address match NET and
type TYPE. */
-extern struct netent *getnetbyaddr (unsigned long int __net, int __type)
+extern struct netent *getnetbyaddr (uint32_t __net, int __type)
__THROW;
/* Return entry from network data base for network with NAME. */
@@ -225,7 +221,7 @@ extern int getnetent_r (struct netent *__restrict __result_buf,
struct netent **__restrict __result,
int *__restrict __h_errnop) __THROW;
-extern int getnetbyaddr_r (unsigned long int __net, int __type,
+extern int getnetbyaddr_r (uint32_t __net, int __type,
struct netent *__restrict __result_buf,
char *__restrict __buf, size_t __buflen,
struct netent **__restrict __result,