From owner-svn-src-all@freebsd.org Tue May 31 19:05:43 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3E6DCB54F58; Tue, 31 May 2016 19:05:43 +0000 (UTC) (envelope-from ed@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 mx1.freebsd.org (Postfix) with ESMTPS id E5D4B1CA5; Tue, 31 May 2016 19:05:42 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u4VJ5gaE053767; Tue, 31 May 2016 19:05:42 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u4VJ5geL053766; Tue, 31 May 2016 19:05:42 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201605311905.u4VJ5geL053766@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Tue, 31 May 2016 19:05:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r301071 - 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-all@freebsd.org X-Mailman-Version: 2.1.22 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: Tue, 31 May 2016 19:05:43 -0000 Author: ed Date: Tue May 31 19:05:41 2016 New Revision: 301071 URL: https://svnweb.freebsd.org/changeset/base/301071 Log: Improve POSIX conformance of . - This header file has always depended on pthread_t, pthread_attr_t, struct timespec, size_t and uid_t. Only as of POSIX 2008, these dependencies have been states explicitly. They should now be defined. - In our implementation, struct sigevent::sigev_notify_attributes has type "void *" instead of "pthread_attr_t *". My guess is that this was done to prevent pulling in the pthread types, but this can easily be avoided by using the underlying structure types. Modified: head/sys/sys/signal.h Modified: head/sys/sys/signal.h ============================================================================== --- head/sys/sys/signal.h Tue May 31 18:45:52 2016 (r301070) +++ head/sys/sys/signal.h Tue May 31 19:05:41 2016 (r301071) @@ -45,6 +45,23 @@ #include /* __MINSIGSTKSZ */ #include /* sig_atomic_t; trap codes; sigcontext */ +#if __POSIX_VISIBLE >= 200809 + +#include +#include + +#ifndef _SIZE_T_DECLARED +typedef __size_t size_t; +#define _SIZE_T_DECLARED +#endif + +#ifndef _UID_T_DECLARED +typedef __uid_t uid_t; +#define _UID_T_DECLARED +#endif + +#endif /* __POSIX_VISIBLE >= 200809 */ + /* * System defined signals. */ @@ -160,6 +177,9 @@ union sigval { #endif #if __POSIX_VISIBLE >= 199309 + +struct pthread_attr; + struct sigevent { int sigev_notify; /* Notification type */ int sigev_signo; /* Signal number */ @@ -168,7 +188,7 @@ struct sigevent { __lwpid_t _threadid; struct { void (*_function)(union sigval); - void *_attribute; /* pthread_attr_t * */ + struct pthread_attr **_attribute; } _sigev_thread; unsigned short _kevent_flags; long __spare__[8]; @@ -190,6 +210,7 @@ struct sigevent { #define SIGEV_KEVENT 3 /* Generate a kevent. */ #define SIGEV_THREAD_ID 4 /* Send signal to a kernel thread. */ #endif + #endif /* __POSIX_VISIBLE >= 199309 */ #if __POSIX_VISIBLE >= 199309 || __XSI_VISIBLE