mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-04 15:40:44 +00:00
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.
This commit is contained in:
parent
9d60f0cbdb
commit
3e9c0bd52c
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=84463
|
@ -61,14 +61,19 @@
|
||||||
#ifndef _NETDB_H_
|
#ifndef _NETDB_H_
|
||||||
#define _NETDB_H_
|
#define _NETDB_H_
|
||||||
|
|
||||||
#include <machine/ansi.h>
|
|
||||||
#include <sys/cdefs.h>
|
#include <sys/cdefs.h>
|
||||||
|
#include <machine/ansi.h>
|
||||||
|
|
||||||
#ifdef _BSD_SIZE_T_
|
#ifdef _BSD_SIZE_T_
|
||||||
typedef _BSD_SIZE_T_ size_t;
|
typedef _BSD_SIZE_T_ size_t;
|
||||||
#undef _BSD_SIZE_T_
|
#undef _BSD_SIZE_T_
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef _BSD_SOCKLEN_T_
|
||||||
|
typedef _BSD_SOCKLEN_T_ socklen_t;
|
||||||
|
#undef _BSD_SOCKLEN_T_
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef _PATH_HEQUIV
|
#ifndef _PATH_HEQUIV
|
||||||
# define _PATH_HEQUIV "/etc/hosts.equiv"
|
# define _PATH_HEQUIV "/etc/hosts.equiv"
|
||||||
#endif
|
#endif
|
||||||
|
@ -197,14 +202,6 @@ struct addrinfo {
|
||||||
*/
|
*/
|
||||||
#define SCOPE_DELIMITER '%'
|
#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
|
__BEGIN_DECLS
|
||||||
void endhostent __P((void));
|
void endhostent __P((void));
|
||||||
void endnetent __P((void));
|
void endnetent __P((void));
|
||||||
|
|
Loading…
Reference in a new issue