Add sa_family_t type to <sys/_types.h> and typedefs to <netinet/in.h>

and <sys/socket.h>.  Previously, sa_family_t was only typedef'd in
<sys/socket.h>.
This commit is contained in:
Mike Barcroft 2002-04-20 02:24:35 +00:00
parent d969f833ed
commit c6e43821cd
3 changed files with 12 additions and 2 deletions

View File

@ -256,6 +256,11 @@ typedef uint16_t in_port_t;
#define _IN_PORT_T_DECLARED
#endif
#ifdef _BSD_SA_FAMILY_T_
typedef _BSD_SA_FAMILY_T_ sa_family_t;
#undef _BSD_SA_FAMILY_T_
#endif
/*
* Internet address (a structure for historical reasons)
*/

View File

@ -33,6 +33,7 @@
#include <machine/ansi.h>
#define _BSD_GID_T_ __uint32_t
#define _BSD_SA_FAMILY_T_ __uint8_t
#define _BSD_UID_T_ __uint32_t
#endif /* !_SYS__TYPES_H_ */

View File

@ -37,7 +37,7 @@
#ifndef _SYS_SOCKET_H_
#define _SYS_SOCKET_H_
#include <machine/ansi.h>
#include <sys/_types.h>
#define _NO_NAMESPACE_POLLUTION
#include <machine/param.h>
#undef _NO_NAMESPACE_POLLUTION
@ -49,7 +49,11 @@
/*
* Data types.
*/
typedef u_char sa_family_t;
#ifdef _BSD_SA_FAMILY_T_
typedef _BSD_SA_FAMILY_T_ sa_family_t;
#undef _BSD_SA_FAMILY_T_
#endif
#ifdef _BSD_SOCKLEN_T_
typedef _BSD_SOCKLEN_T_ socklen_t;
#undef _BSD_SOCKLEN_T_