Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/sys/socket.h,v retrieving revision 1.100.2.2 retrieving revision 1.101 diff -u -p -r1.100.2.2 -r1.101 --- src/sys/sys/socket.h 2012/10/30 17:22:57 1.100.2.2 +++ src/sys/sys/socket.h 2011/12/20 23:56:29 1.101 @@ -1,4 +1,4 @@ -/* $NetBSD: socket.h,v 1.100.2.2 2012/10/30 17:22:57 yamt Exp $ */ +/* $NetBSD: socket.h,v 1.101 2011/12/20 23:56:29 christos Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -110,7 +110,6 @@ typedef _BSD_SSIZE_T_ ssize_t; #define SOCK_CLOEXEC 0x10000000 /* set close on exec on socket */ #define SOCK_NONBLOCK 0x20000000 /* set non blocking i/o socket */ -#define SOCK_NOSIGPIPE 0x40000000 /* don't send sigpipe */ #define SOCK_FLAGS_MASK 0xf0000000 /* flags mask */ /* @@ -127,7 +126,6 @@ typedef _BSD_SSIZE_T_ ssize_t; #define SO_OOBINLINE 0x0100 /* leave received OOB data in line */ #define SO_REUSEPORT 0x0200 /* allow local address & port reuse */ /* SO_OTIMESTAMP 0x0400 */ -#define SO_NOSIGPIPE 0x0800 /* no SIGPIPE from EPIPE */ #define SO_ACCEPTFILTER 0x1000 /* there is an accept filter */ #define SO_TIMESTAMP 0x2000 /* timestamp received dgram traffic */ @@ -495,12 +493,6 @@ struct msghdr { #if defined(_NETBSD_SOURCE) #define MSG_CMSG_CLOEXEC 0x0800 /* close on exec receiving fd */ #define MSG_NBIO 0x1000 /* use non-blocking I/O */ -#define MSG_WAITFORONE 0x2000 /* recvmmsg() wait for one message */ - -struct mmsghdr { - struct msghdr msg_hdr; - unsigned int msg_len; -}; #endif /* Extra flags used internally only */ @@ -539,7 +531,7 @@ struct cmsghdr { * without (2), we can't guarantee binary compatibility in case of future * changes in ALIGNBYTES. */ -#define __CMSG_ALIGN(n) (((n) + __ALIGNBYTES) & ~__ALIGNBYTES) +#define __CMSG_ALIGN(n) (((n) + __cmsg_alignbytes()) & ~__cmsg_alignbytes()) #ifdef _KERNEL #define CMSG_ALIGN(n) __CMSG_ALIGN(n) #endif @@ -550,7 +542,7 @@ struct cmsghdr { __CMSG_ALIGN(sizeof(struct cmsghdr)) > \ (((char *)(mhdr)->msg_control) + (mhdr)->msg_controllen)) ? \ (struct cmsghdr *)0 : \ - (struct cmsghdr *)(void *)((char *)(cmsg) + \ + (struct cmsghdr *)((char *)(cmsg) + \ __CMSG_ALIGN((cmsg)->cmsg_len))) /* @@ -582,6 +574,10 @@ struct cmsghdr { #include +__BEGIN_DECLS +int __cmsg_alignbytes(void); +__END_DECLS + #ifdef _KERNEL static inline socklen_t sockaddr_getlen(const struct sockaddr *sa) @@ -635,13 +631,6 @@ __RENAME(__socket30) #endif ; int socketpair(int, int, int, int *); - -#if defined(_NETBSD_SOURCE) -int sendmmsg(int, struct mmsghdr *, unsigned int, unsigned int); -struct timespec; -int recvmmsg(int, struct mmsghdr *, unsigned int, unsigned int, - struct timespec *); -#endif __END_DECLS #endif /* !_KERNEL */