From owner-freebsd-bugs@FreeBSD.ORG Tue Aug 20 22:00:00 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5AFF186 for ; Tue, 20 Aug 2013 22:00:00 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 93DFF2FC4 for ; Tue, 20 Aug 2013 22:00:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r7KM00sN047184 for ; Tue, 20 Aug 2013 22:00:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r7KM00Ln047183; Tue, 20 Aug 2013 22:00:00 GMT (envelope-from gnats) Resent-Date: Tue, 20 Aug 2013 22:00:00 GMT Resent-Message-Id: <201308202200.r7KM00Ln047183@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dmitrijs Ledkovs Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9F44716A for ; Tue, 20 Aug 2013 21:58:15 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 8C3522FB4 for ; Tue, 20 Aug 2013 21:58:15 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id r7KLwFJh038367 for ; Tue, 20 Aug 2013 21:58:15 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id r7KLwEoM038366; Tue, 20 Aug 2013 21:58:14 GMT (envelope-from nobody) Message-Id: <201308202158.r7KLwEoM038366@oldred.freebsd.org> Date: Tue, 20 Aug 2013 21:58:14 GMT From: Dmitrijs Ledkovs To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/181439: sys/wait.h is not enough to use waitid(), but kind of should be. X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Aug 2013 22:00:00 -0000 >Number: 181439 >Category: misc >Synopsis: sys/wait.h is not enough to use waitid(), but kind of should be. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Aug 20 22:00:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: Dmitrijs Ledkovs >Release: 9.2-rc2 >Organization: >Environment: >Description: "[CX] The header shall define the siginfo_t type as a structure." http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html " #include int waitid(idtype_t idtype, id_t id, siginfo_t *infop, int options); " http://pubs.opengroup.org/onlinepubs/9699919799/functions/waitid.html To use waitid() one needs to pass "siginfo_t *" to it, thus it's reasonable to expect that "siginfo_t" would be defined if is included. When the below code sample is compiled: * on linux - there is one error too few arguments to function call waitid * on freebsd - there are two errors (a) unknown type name 'siginfo_t' (b) too few arguments to function call waitid I'm not sure if it's a bug in the standard, linux implementation, or freebsd implementation. But it would be nice, if both linux & freebsd implementations interpreted the standard the same, i.e. "#include is enough to call waitid()" >How-To-Repeat: #include siginfo_t info; int main(){ waitid(); return 0; } >Fix: header should include header. >Release-Note: >Audit-Trail: >Unformatted: