diff options
author | bde <bde@FreeBSD.org> | 2001-10-04 10:34:30 +0000 |
---|---|---|
committer | bde <bde@FreeBSD.org> | 2001-10-04 10:34:30 +0000 |
commit | 18b78355b8621cae4f0cb3aa0448d1808b09d97f (patch) | |
tree | f2383bf61f8232271021d0cf6d79a7e492f042d0 | |
parent | 5adad7bfe991946d968177b4d27db3ecf21a33c5 (diff) | |
download | FreeBSD-src-18b78355b8621cae4f0cb3aa0448d1808b09d97f.zip FreeBSD-src-18b78355b8621cae4f0cb3aa0448d1808b09d97f.tar.gz |
Fixed order of includes. <sys/cdefs.h> must be included before
<machine/ansi.h> 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.
-rw-r--r-- | include/netdb.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/include/netdb.h b/include/netdb.h index f2196f2..f7fb1aa 100644 --- a/include/netdb.h +++ b/include/netdb.h @@ -61,14 +61,19 @@ #ifndef _NETDB_H_ #define _NETDB_H_ -#include <machine/ansi.h> #include <sys/cdefs.h> +#include <machine/ansi.h> #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)); |