From owner-svn-src-all@freebsd.org Fri Mar 2 22:32:54 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 97ABDF28409; Fri, 2 Mar 2018 22:32:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4A5887CF3B; Fri, 2 Mar 2018 22:32:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4547F1D9AC; Fri, 2 Mar 2018 22:32:54 +0000 (UTC) (envelope-from brooks@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id w22MWsZg069749; Fri, 2 Mar 2018 22:32:54 GMT (envelope-from brooks@FreeBSD.org) Received: (from brooks@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id w22MWriF069743; Fri, 2 Mar 2018 22:32:53 GMT (envelope-from brooks@FreeBSD.org) Message-Id: <201803022232.w22MWriF069743@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: brooks set sender to brooks@FreeBSD.org using -f From: Brooks Davis Date: Fri, 2 Mar 2018 22:32:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r330299 - in head: contrib/sendmail/include/sm/os lib/libc/gen lib/libc/sys sys/sys usr.bin/svn/lib/libapr X-SVN-Group: head X-SVN-Commit-Author: brooks X-SVN-Commit-Paths: in head: contrib/sendmail/include/sm/os lib/libc/gen lib/libc/sys sys/sys usr.bin/svn/lib/libapr X-SVN-Commit-Revision: 330299 X-SVN-Commit-Repository: base MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2018 22:32:54 -0000 Author: brooks Date: Fri Mar 2 22:32:53 2018 New Revision: 330299 URL: https://svnweb.freebsd.org/changeset/base/330299 Log: Don't declare union semun in userspace unless _WANT_SEMUN is defined. POSIX explicitly states that the application must declare union semun. This makes no sense, but it is what it is. This brings us into line with Linux, MacOS/Darwin, and NetBSD. In a ports exp-run a moderate number of ports fail due to a lack of approprate autotools-like discovery mechanisms or local patches. A commit to address them will follow shortly. PR: 224300, 224443 (exp-run) Reviewed by: emaste, jhb, kib Exp-run by: antoine Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D14492 Modified: head/contrib/sendmail/include/sm/os/sm_os_freebsd.h head/lib/libc/gen/semctl.c head/lib/libc/sys/semctl.2 head/sys/sys/param.h head/sys/sys/sem.h head/usr.bin/svn/lib/libapr/apr.h Modified: head/contrib/sendmail/include/sm/os/sm_os_freebsd.h ============================================================================== --- head/contrib/sendmail/include/sm/os/sm_os_freebsd.h Fri Mar 2 22:13:29 2018 (r330298) +++ head/contrib/sendmail/include/sm/os/sm_os_freebsd.h Fri Mar 2 22:32:53 2018 (r330299) @@ -34,7 +34,7 @@ # define SM_CONF_SHM 1 #endif /* SM_CONF_SHM */ #ifndef SM_CONF_SEM -# define SM_CONF_SEM 1 +# define SM_CONF_SEM 2 #endif /* SM_CONF_SEM */ #ifndef SM_CONF_MSG # define SM_CONF_MSG 1 Modified: head/lib/libc/gen/semctl.c ============================================================================== --- head/lib/libc/gen/semctl.c Fri Mar 2 22:13:29 2018 (r330298) +++ head/lib/libc/gen/semctl.c Fri Mar 2 22:32:53 2018 (r330299) @@ -34,6 +34,7 @@ __FBSDID("$FreeBSD$"); #ifndef NO_COMPAT7 #define _WANT_SEMUN_OLD #endif +#define _WANT_SEMUN #include #include Modified: head/lib/libc/sys/semctl.2 ============================================================================== --- head/lib/libc/sys/semctl.2 Fri Mar 2 22:13:29 2018 (r330298) +++ head/lib/libc/sys/semctl.2 Fri Mar 2 22:32:53 2018 (r330299) @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd September 12, 1995 +.Dd February 23, 2018 .Dt SEMCTL 2 .Os .Sh NAME @@ -55,10 +55,7 @@ For the commands that use the .Fa arg argument, .Fa "union semun" -is defined as follows: -.\" -.\" From : -.\" +must be defined as follows: .Bd -literal union semun { int val; /* value for SETVAL */ @@ -66,6 +63,12 @@ union semun { u_short *array; /* array for GETALL & SETALL */ }; .Ed +Non-portable software may define +.Dv _WANT_SEMUN +before including +.Pa sys/sem.h +to use the system definition of +.Fa "union semun" . .Pp Commands are performed as follows: .\" Modified: head/sys/sys/param.h ============================================================================== --- head/sys/sys/param.h Fri Mar 2 22:13:29 2018 (r330298) +++ head/sys/sys/param.h Fri Mar 2 22:32:53 2018 (r330299) @@ -60,7 +60,7 @@ * in the range 5 to 9. */ #undef __FreeBSD_version -#define __FreeBSD_version 1200058 /* Master, propagated to newvers */ +#define __FreeBSD_version 1200059 /* Master, propagated to newvers */ /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, Modified: head/sys/sys/sem.h ============================================================================== --- head/sys/sys/sem.h Fri Mar 2 22:13:29 2018 (r330298) +++ head/sys/sys/sem.h Fri Mar 2 22:32:53 2018 (r330299) @@ -76,6 +76,7 @@ union semun_old { }; #endif +#if defined(_KERNEL) || defined(_WANT_SEMUN) /* * semctl's arg parameter structure */ @@ -84,6 +85,7 @@ union semun { struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ unsigned short *array; /* array for GETALL & SETALL */ }; +#endif /* * commands for semctl Modified: head/usr.bin/svn/lib/libapr/apr.h ============================================================================== --- head/usr.bin/svn/lib/libapr/apr.h Fri Mar 2 22:13:29 2018 (r330298) +++ head/usr.bin/svn/lib/libapr/apr.h Fri Mar 2 22:32:53 2018 (r330299) @@ -261,7 +261,7 @@ extern "C" { #define APR_HAVE_STRSTR 1 #define APR_HAVE_MEMCHR 1 #define APR_HAVE_STRUCT_RLIMIT 1 -#define APR_HAVE_UNION_SEMUN 1 +#define APR_HAVE_UNION_SEMUN 0 #define APR_HAVE_SCTP 1 #define APR_HAVE_IOVEC 1