Date: Sat, 30 Mar 2013 13:30:28 +0000 (UTC) From: Jilles Tjoelker <jilles@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248932 - head/sys/sys Message-ID: <201303301330.r2UDUSB9035512@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jilles Date: Sat Mar 30 13:30:27 2013 New Revision: 248932 URL: http://svnweb.freebsd.org/changeset/base/248932 Log: Improve namespacing in <sys/socket.h>: * MSG_NOSIGNAL is in POSIX.1-2008. * MSG_NOTIFICATION (SCTP) is not in POSIX. * PRU_FLUSH_* (SCTP) are not in POSIX. * bindat()/connectat() are not in POSIX. Discussed with: rrs (PRU_FLUSH_*) Modified: head/sys/sys/socket.h Modified: head/sys/sys/socket.h ============================================================================== --- head/sys/sys/socket.h Sat Mar 30 07:44:50 2013 (r248931) +++ head/sys/sys/socket.h Sat Mar 30 13:30:27 2013 (r248932) @@ -455,20 +455,20 @@ struct msghdr { #define MSG_TRUNC 0x10 /* data discarded before delivery */ #define MSG_CTRUNC 0x20 /* control data lost before delivery */ #define MSG_WAITALL 0x40 /* wait for full request or error */ -#define MSG_NOTIFICATION 0x2000 /* SCTP notification */ +#if __POSIX_VISIBLE >= 200809 +#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ +#endif #if __BSD_VISIBLE #define MSG_DONTWAIT 0x80 /* this message should be nonblocking */ #define MSG_EOF 0x100 /* data completes connection */ +#define MSG_NOTIFICATION 0x2000 /* SCTP notification */ #define MSG_NBIO 0x4000 /* FIONBIO mode, used by fifofs */ #define MSG_COMPAT 0x8000 /* used in sendit() */ +#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */ #endif #ifdef _KERNEL #define MSG_SOCALLBCK 0x10000 /* for use by socket callbacks - soreceive (TCP) */ #endif -#if __BSD_VISIBLE -#define MSG_NOSIGNAL 0x20000 /* do not generate SIGPIPE on EOF */ -#define MSG_CMSG_CLOEXEC 0x40000 /* make received fds close-on-exec */ -#endif /* * Header for ancillary data objects in msg_control buffer. @@ -597,10 +597,13 @@ struct omsghdr { #define SHUT_WR 1 /* shut down the writing side */ #define SHUT_RDWR 2 /* shut down both sides */ +#if __BSD_VISIBLE +/* for SCTP */ /* we cheat and use the SHUT_XX defines for these */ #define PRU_FLUSH_RD SHUT_RD #define PRU_FLUSH_WR SHUT_WR #define PRU_FLUSH_RDWR SHUT_RDWR +#endif #if __BSD_VISIBLE @@ -629,9 +632,11 @@ struct sf_hdtr { __BEGIN_DECLS int accept(int, struct sockaddr * __restrict, socklen_t * __restrict); int bind(int, const struct sockaddr *, socklen_t); -int bindat(int, int, const struct sockaddr *, socklen_t); int connect(int, const struct sockaddr *, socklen_t); +#if __BSD_VISIBLE +int bindat(int, int, const struct sockaddr *, socklen_t); int connectat(int, int, const struct sockaddr *, socklen_t); +#endif int getpeername(int, struct sockaddr * __restrict, socklen_t * __restrict); int getsockname(int, struct sockaddr * __restrict, socklen_t * __restrict); int getsockopt(int, int, int, void * __restrict, socklen_t * __restrict);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201303301330.r2UDUSB9035512>