From owner-svn-src-head@FreeBSD.ORG Sat Mar 30 13:30:30 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F1C86658; Sat, 30 Mar 2013 13:30:29 +0000 (UTC) (envelope-from jilles@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id CAC9E79A; Sat, 30 Mar 2013 13:30:29 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r2UDUSj3035513; Sat, 30 Mar 2013 13:30:28 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r2UDUSB9035512; Sat, 30 Mar 2013 13:30:28 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201303301330.r2UDUSB9035512@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 30 Mar 2013 13:30:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r248932 - head/sys/sys X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 30 Mar 2013 13:30:30 -0000 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 : * 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);