diff options
author | mike <mike@FreeBSD.org> | 2001-12-01 03:43:01 +0000 |
---|---|---|
committer | mike <mike@FreeBSD.org> | 2001-12-01 03:43:01 +0000 |
commit | 20cacce16c233112fc71cb819fa0db765acba715 (patch) | |
tree | e691b950e4d1dd3407416b2bd0eed4f0f8ca57e5 /sys | |
parent | 0d72b82e2e3d36c1011b9e4d84e5d4fe35279c05 (diff) | |
download | FreeBSD-src-20cacce16c233112fc71cb819fa0db765acba715.zip FreeBSD-src-20cacce16c233112fc71cb819fa0db765acba715.tar.gz |
o Stop abusing MD headers with non-MD types.
o Hide nonstandard functions and types in <netinet/in.h> when
_POSIX_SOURCE is defined.
o Add some missing types (required by POSIX.1-200x) to <netinet/in.h>.
o Restore vendor ID from Rev 1.1 in <netinet/in.h> and make use of new
__FBSDID() macro.
o Fix some miscellaneous issues in <arpa/inet.h>.
o Correct final argument for the inet_ntop() function (POSIX.1-200x).
o Get rid of the namespace pollution from <sys/types.h> in
<arpa/inet.h>.
Reviewed by: fenner
Partially submitted by: bde
Diffstat (limited to 'sys')
-rw-r--r-- | sys/alpha/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/arm/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/i386/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/ia64/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/netinet/in.h | 15 | ||||
-rw-r--r-- | sys/powerpc/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/sparc64/include/ansi.h | 2 | ||||
-rw-r--r-- | sys/sys/types.h | 18 |
8 files changed, 24 insertions, 21 deletions
diff --git a/sys/alpha/include/ansi.h b/sys/alpha/include/ansi.h index 3d9d396..fb37f9a 100644 --- a/sys/alpha/include/ansi.h +++ b/sys/alpha/include/ansi.h @@ -49,8 +49,6 @@ */ #define _BSD_CLOCK_T_ int /* clock() */ #define _BSD_CLOCKID_T_ int /* clock_gettime()... */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/arm/include/ansi.h b/sys/arm/include/ansi.h index a2a128f..4c3f8de 100644 --- a/sys/arm/include/ansi.h +++ b/sys/arm/include/ansi.h @@ -49,8 +49,6 @@ */ #define _BSD_CLOCK_T_ int /* clock() */ #define _BSD_CLOCKID_T_ int /* clockid_t */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/i386/include/ansi.h b/sys/i386/include/ansi.h index b1de8ae..46407d5 100644 --- a/sys/i386/include/ansi.h +++ b/sys/i386/include/ansi.h @@ -48,8 +48,6 @@ */ #define _BSD_CLOCK_T_ unsigned long /* clock()... */ #define _BSD_CLOCKID_T_ int /* clock_gettime()... */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/ia64/include/ansi.h b/sys/ia64/include/ansi.h index 3f8fcd7..3c5f632 100644 --- a/sys/ia64/include/ansi.h +++ b/sys/ia64/include/ansi.h @@ -49,8 +49,6 @@ */ #define _BSD_CLOCK_T_ int /* clock() */ #define _BSD_CLOCKID_T_ int /* clockid_t */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/netinet/in.h b/sys/netinet/in.h index 9ea89cd..cf72e57 100644 --- a/sys/netinet/in.h +++ b/sys/netinet/in.h @@ -228,12 +228,27 @@ */ #define IPPORT_RESERVEDSTART 600 +#define IPPORT_MAX 65535 + +#ifndef _IN_ADDR_T_DECLARED_ +typedef __uint32_t in_addr_t; +#define _IN_ADDR_T_DECLARED_ +#endif + +#ifndef _IN_PORT_T_DECLARED_ +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED_ +#endif + /* * Internet address (a structure for historical reasons) */ +#ifndef _STRUCT_IN_ADDR_DECLARED struct in_addr { in_addr_t s_addr; }; +#define _STRUCT_IN_ADDR_DECLARED +#endif /* * Definitions of bits in internet address integers. diff --git a/sys/powerpc/include/ansi.h b/sys/powerpc/include/ansi.h index 0279ee7..017d5fd 100644 --- a/sys/powerpc/include/ansi.h +++ b/sys/powerpc/include/ansi.h @@ -48,8 +48,6 @@ */ #define _BSD_CLOCK_T_ int /* clock() */ #define _BSD_CLOCKID_T_ int /* clockid_t */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ int /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/sparc64/include/ansi.h b/sys/sparc64/include/ansi.h index df04532..49e76c3 100644 --- a/sys/sparc64/include/ansi.h +++ b/sys/sparc64/include/ansi.h @@ -49,8 +49,6 @@ */ #define _BSD_CLOCK_T_ int /* clock() */ #define _BSD_CLOCKID_T_ int /* clock_gettime()... */ -#define _BSD_IN_ADDR_T_ __uint32_t /* inet(3) functions */ -#define _BSD_IN_PORT_T_ __uint16_t #define _BSD_MBSTATE_T_ __mbstate_t /* mbstate_t */ #define _BSD_PTRDIFF_T_ long /* ptr1 - ptr2 */ #define _BSD_RUNE_T_ _BSD_CT_RUNE_T_ /* rune_t (see below) */ diff --git a/sys/sys/types.h b/sys/sys/types.h index a0a49bf..0477a24 100644 --- a/sys/sys/types.h +++ b/sys/sys/types.h @@ -124,7 +124,7 @@ typedef u_int32_t dev_t; /* device number */ /* * XXX: Deprecated; - * byteorder(3) functions now defined in <apra/inet.h>. + * byteorder(3) functions now defined in <arpa/inet.h>. */ #include <machine/endian.h> @@ -138,16 +138,16 @@ typedef _BSD_CLOCKID_T_ clockid_t; #undef _BSD_CLOCKID_T_ #endif -/* XXX: Deprecated; now defined in <apra/inet.h>. */ -#ifdef _BSD_IN_ADDR_T_ -typedef _BSD_IN_ADDR_T_ in_addr_t; -#undef _BSD_IN_ADDR_T_ +/* XXX: Deprecated; now defined in <arpa/inet.h>. */ +#ifndef _IN_ADDR_T_DECLARED_ +typedef __uint32_t in_addr_t; +#define _IN_ADDR_T_DECLARED_ #endif -/* XXX: Deprecated; now defined in <apra/inet.h>. */ -#ifdef _BSD_IN_PORT_T_ -typedef _BSD_IN_PORT_T_ in_port_t; -#undef _BSD_IN_PORT_T_ +/* XXX: Deprecated; now defined in <arpa/inet.h>. */ +#ifndef _IN_PORT_T_DECLARED_ +typedef __uint16_t in_port_t; +#define _IN_PORT_T_DECLARED_ #endif #ifdef _BSD_SIZE_T_ |