about summary refs log tree commit diff
path: root/inet/netdb.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-07-26 10:14:02 +0000
committerRoland McGrath <roland@gnu.org>1995-07-26 10:14:02 +0000
commit3d61b63cc722951e3a5261e6bc3f0488eb35d441 (patch)
tree19195b08df7f3f992f0d539205df60ff690cd0f6 /inet/netdb.h
parent958f803fc021993cc2ee1d4157d0092b830368aa (diff)
downloadglibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.tar.gz
glibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.tar.xz
glibc-3d61b63cc722951e3a5261e6bc3f0488eb35d441.zip
* asia, backward, europe, leapseconds, southamerica: New data from
	ADO's 95e.

	* inet/Makefile (routines): Removed inet_addr.
	* inet/inet_addr.c: Moved to resolv/ subdirectory.
	* resolv/Makefile (routines): Added inet_addr.
	* resolv/inet_addr.c: Incorporated from BIND 4.9.3-BETA24 release.
	* resolv/gethnamaddr.c: Likewise.
	* resolv/getnetbyaddr.c: Likewise.
	* resolv/getnetbyname.c: Likewise.
	* resolv/getnetent.c: Likewise.
	* resolv/getnetnamadr.c: Likewise.
	* resolv/herror.c: Likewise.
	* resolv/nsap_addr.c: Likewise.
	* resolv/res_comp.c: Likewise.
	* resolv/res_debug.c: Likewise.
	* resolv/res_init.c: Likewise.
	* resolv/res_mkquery.c: Likewise.
	* resolv/res_query.c: Likewise.
	* resolv/res_send.c: Likewise.
	* resolv/resolv.h: Likewise.
	* resolv/sethostent.c: Likewise.
	* resolv/arpa/nameser.h: Likewise.
	* inet/netdb.h: Incorporated from BIND 4.9.3-BETA24 release.
	[__GNU_LIBRARY__]: Include <rpc/netdb.h> instead of repeating
	its declarations (and doing so only #ifdef sun!).

	* posix/sys/types.h [__USE_BSD] (__BIT_TYPES_DEFINED__): New macro.
	[__USE_BSD] [__GNUC__] (int64_t, u_int64_t, register_t): New typedefs.
Diffstat (limited to 'inet/netdb.h')
-rw-r--r--inet/netdb.h44
1 files changed, 33 insertions, 11 deletions
diff --git a/inet/netdb.h b/inet/netdb.h
index 21caa894f9..a568e2d6a5 100644
--- a/inet/netdb.h
+++ b/inet/netdb.h
@@ -1,4 +1,6 @@
-/*-
+/*
+ * ++Copyright++ 1980, 1983, 1988, 1993
+ * -
  * Copyright (c) 1980, 1983, 1988, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
@@ -29,19 +31,16 @@
  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
- *
- *      @(#)netdb.h	8.1 (Berkeley) 6/2/93
- *	$Id$
  * -
  * Portions Copyright (c) 1993 by Digital Equipment Corporation.
- * 
+ *
  * Permission to use, copy, modify, and distribute this software for any
  * purpose with or without fee is hereby granted, provided that the above
  * copyright notice and this permission notice appear in all copies, and that
  * the name of Digital Equipment Corporation not be used in advertising or
  * publicity pertaining to distribution of the document or software without
  * specific, written prior permission.
- * 
+ *
  * THE SOFTWARE IS PROVIDED "AS IS" AND DIGITAL EQUIPMENT CORP. DISCLAIMS ALL
  * WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
  * OF MERCHANTABILITY AND FITNESS.   IN NO EVENT SHALL DIGITAL EQUIPMENT
@@ -54,15 +53,28 @@
  * --Copyright--
  */
 
+/*
+ *      @(#)netdb.h	8.1 (Berkeley) 6/2/93
+ *	$Id$
+ */
+
 #ifndef _NETDB_H_
 #define _NETDB_H_
 
+#include <sys/param.h>
+#if (!defined(BSD)) || (BSD < 199306)
+# include <sys/bitypes.h>
+#endif
+#include <sys/cdefs.h>
+
 #define	_PATH_HEQUIV	"/etc/hosts.equiv"
 #define	_PATH_HOSTS	"/etc/hosts"
 #define	_PATH_NETWORKS	"/etc/networks"
 #define	_PATH_PROTOCOLS	"/etc/protocols"
 #define	_PATH_SERVICES	"/etc/services"
 
+extern int h_errno;
+
 /*
  * Structures returned by network data base library.  All addresses are
  * supplied in host order, and returned in network order (suitable for
@@ -106,8 +118,6 @@ struct	protoent {
  * (left in extern int h_errno).
  */
 
-extern int h_errno;
-
 #define	NETDB_INTERNAL	-1	/* see errno */
 #define	NETDB_SUCCESS	0	/* no problem */
 #define	HOST_NOT_FOUND	1 /* Authoritative Answer Host not found */
@@ -116,8 +126,6 @@ extern int h_errno;
 #define	NO_DATA		4 /* Valid name, no data record of requested type */
 #define	NO_ADDRESS	NO_DATA		/* no address, look for MX record */
 
-#include <sys/cdefs.h>
-
 __BEGIN_DECLS
 void		endhostent __P((void));
 void		endnetent __P((void));
@@ -136,7 +144,7 @@ struct servent	*getservbyname __P((const char *, const char *));
 struct servent	*getservbyport __P((int, const char *));
 struct servent	*getservent __P((void));
 void		herror __P((const char *));
-char		*hstrerror __P((int));
+const char	*hstrerror __P((int));
 void		sethostent __P((int));
 /* void		sethostfile __P((const char *)); */
 void		setnetent __P((int));
@@ -144,4 +152,18 @@ void		setprotoent __P((int));
 void		setservent __P((int));
 __END_DECLS
 
+/* This is nec'y to make this include file properly replace the sun version. */
+#ifdef __GNU_LIBRARY__
+#include <rpc/netdb.h>
+#else
+#ifdef sun
+struct rpcent {
+	char	*r_name;	/* name of server for this rpc program */
+	char	**r_aliases;	/* alias list */
+	int	r_number;	/* rpc program number */
+};
+struct rpcent	*getrpcbyname(), *getrpcbynumber(), *getrpcent();
+#endif /* sun */
+#endif /* __GNU_LIBRARY__ */
+
 #endif /* !_NETDB_H_ */