--- old/usr/src/head/netdb.h	Tue Aug 12 07:52:09 2014
+++ new/usr/src/head/netdb.h	Tue Aug 12 07:52:09 2014
@@ -229,7 +229,6 @@
 	char	*s_proto;	/* protocol to use */
 };
 
-#ifdef	__STDC__
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 struct hostent	*gethostbyname_r
 	(const char *, struct hostent *, char *, int, int *h_errnop);
@@ -262,7 +261,9 @@
 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
 
 /* Old interfaces that return a pointer to a static area;  MT-unsafe */
+#ifndef _STRICT_XPG7
 struct hostent	*gethostbyname(const char *);
+#endif
 struct hostent	*gethostent(void);
 struct netent	*getnetbyaddr(in_addr_t, int);
 struct netent	*getnetbyname(const char *);
@@ -274,12 +275,17 @@
 struct servent	*getservbyport(int, const char *);
 struct servent	*getservent(void);
 
-/* gethostbyaddr() second argument is a size_t only in unix95/unix98 */
+/*
+ * gethostbyaddr() second argument is a size_t only in unix95/unix98,
+ * removed in XPG issue 7
+ */
+#if !defined(_STRICT_XPG7)
 #if !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__)
 struct hostent	*gethostbyaddr(const void *, socklen_t, int);
 #else
 struct hostent	*gethostbyaddr(const void *, size_t, int);
 #endif /* !defined(_XPG4_2) || defined(_XPG6) || defined(__EXTENSIONS__) */
+#endif	/* !defined(_STRICT_XPG7) */
 
 #if !defined(_XPG4_2) || defined(__EXTENSIONS__)
 int endhostent(void);
@@ -353,95 +359,18 @@
 /* END IPsec algorithm prototype definitions */
 
 #endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
-#else	/* __STDC__ */
-struct hostent	*gethostbyname_r();
-struct hostent	*gethostbyaddr_r();
-struct hostent	*getipnodebyname();
-struct hostent	*getipnodebyaddr();
-void		 freehostent();
-struct hostent	*gethostent_r();
-struct servent	*getservbyname_r();
-struct servent	*getservbyport_r();
-struct servent	*getservent_r();
-struct netent	*getnetbyname_r();
-struct netent	*getnetbyaddr_r();
-struct netent	*getnetent_r();
-struct protoent	*getprotobyname_r();
-struct protoent	*getprotobynumber_r();
-struct protoent	*getprotoent_r();
-int		 getnetgrent_r();
-int		 innetgr();
 
-/* Old interfaces that return a pointer to a static area;  MT-unsafe */
-struct hostent	*gethostbyname();
-struct hostent	*gethostbyaddr();
-struct hostent	*gethostent();
-struct netent	*getnetbyname();
-struct netent	*getnetbyaddr();
-struct netent	*getnetent();
-struct servent	*getservbyname();
-struct servent	*getservbyport();
-struct servent	*getservent();
-struct protoent	*getprotobyname();
-struct protoent	*getprotobynumber();
-struct protoent	*getprotoent();
-int		 getnetgrent();
-
-int sethostent();
-int endhostent();
-int setnetent();
-int endnetent();
-int setservent();
-int endservent();
-int setprotoent();
-int endprotoent();
-int setnetgrent();
-int endnetgrent();
-int rcmd();
-int rcmd_af();
-int rexec();
-int rexec_af();
-int rresvport();
-int rresvport_af();
-int rresvport_addr();
-int ruserok();
-/* BIND */
-struct hostent	*gethostbyname2();
-void		herror();
-char		*hstrerror();
-/* IPv6 prototype definitons */
-int		getaddrinfo();
-void		freeaddrinfo();
-const char	*gai_strerror();
-int		getnameinfo();
-/* END IPv6 prototype definitions */
-/* End BIND */
-
-#if !defined(_XPG4_2) || defined(__EXTENSIONS__)
-/* IPsec algorithm prototype definitions */
-struct ipsecalgent *getalgbyname();
-struct ipsecalgent *getalgbydoi();
-int getdoidomainbyname();
-const char *getdoidomainbynum();
-void freealgent();
-/* END IPsec algorithm prototype definitions */
-#endif /* !defined(_XPG4_2) || defined(__EXTENSIONS__) */
-
-#endif	/* __STDC__ */
-
 /*
  * Error return codes from gethostbyname() and gethostbyaddr()
  * (when using the resolver)
  */
 
+/* h_errno was removed in Issue 7 */
+#if !defined(_STRICT_XPG7)
 extern  int h_errno;
 
 #ifdef	_REENTRANT
-#ifdef	__STDC__
 extern int	*__h_errno(void);
-#else
-extern int	*__h_errno();
-#endif	/* __STDC__ */
 
 /* Only #define h_errno if there is no conflict with other use */
 #ifdef	H_ERRNO_IS_FUNCTION
@@ -466,6 +395,8 @@
 #define	NETDB_SUCCESS	0	/* no problem */
 /* End BIND */
 
+#endif	/* !defined(_STRICT_XPG7) */
+
 #define	MAXHOSTNAMELEN	256
 
 #define	MAXALIASES	35
