From 3e9c0bd52c9b62318ea3f9e7a59147b22edeb5fb Mon Sep 17 00:00:00 2001 From: Bruce Evans Date: Thu, 4 Oct 2001 10:34:30 +0000 Subject: [PATCH] Fixed order of includes. must be included before for the definition of __signed, unless the compiler is gcc. Moved the declaration of socklen_t up together with the declaration of size_t, and removed low-quality comment about this declaration. Declaring socklen_t in this file is normal in POSIX-1.200x, unlike declaring size_t. --- include/netdb.h | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/include/netdb.h b/include/netdb.h index f2196f2c9b26..f7fb1aa05594 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -61,14 +61,19 @@ #ifndef _NETDB_H_ #define _NETDB_H_ -#include #include +#include #ifdef _BSD_SIZE_T_ typedef _BSD_SIZE_T_ size_t; #undef _BSD_SIZE_T_ #endif +#ifdef _BSD_SOCKLEN_T_ +typedef _BSD_SOCKLEN_T_ socklen_t; +#undef _BSD_SOCKLEN_T_ +#endif + #ifndef _PATH_HEQUIV # define _PATH_HEQUIV "/etc/hosts.equiv" #endif @@ -197,14 +202,6 @@ struct addrinfo { */ #define SCOPE_DELIMITER '%' -/* - * data types - basically forward decl for getnameinfo() - */ -#ifdef _BSD_SOCKLEN_T_ -typedef _BSD_SOCKLEN_T_ socklen_t; -#undef _BSD_SOCKLEN_T_ -#endif - __BEGIN_DECLS void endhostent __P((void)); void endnetent __P((void));