From owner-svn-src-stable-10@freebsd.org Mon Feb 13 15:16:25 2017 Return-Path: Delivered-To: svn-src-stable-10@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 80E0ACDDB7E; Mon, 13 Feb 2017 15:16:25 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from smtp.vangyzen.net (hotblack.vangyzen.net [IPv6:2607:fc50:1000:7400:216:3eff:fe72:314f]) by mx1.freebsd.org (Postfix) with ESMTP id 68D491E9C; Mon, 13 Feb 2017 15:16:25 +0000 (UTC) (envelope-from eric@vangyzen.net) Received: from sweettea.beer.town (unknown [76.164.8.130]) by smtp.vangyzen.net (Postfix) with ESMTPSA id 844FD564DF; Mon, 13 Feb 2017 09:16:24 -0600 (CST) Subject: Re: svn commit: r313632 - in stable/10/contrib/netbsd-tests/lib/libc/gen: . posix_spawn To: Ed Schouten References: <201702110735.v1B7ZROH028648@repo.freebsd.org> <65538136-4b19-bc06-f3e0-302ef2fc2359@vangyzen.net> Cc: Ngie Cooper , src-committers , svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org From: Eric van Gyzen Message-ID: Date: Mon, 13 Feb 2017 09:16:20 -0600 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-stable-10@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for only the 10-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Feb 2017 15:16:25 -0000 On 02/13/2017 02:22, Ed Schouten wrote: > 2017-02-11 15:28 GMT+01:00 Eric van Gyzen : >> I would be concerned that app developers would read this definition, ignore >> the one in the man page, and use the __-prefixed types in their apps. > > I think that's a concern that's not specific to the change at hand, as > that's simply how BSD header files work. Take a look at the > declaration of kill() in our copy of : > > int kill(__pid_t, int); > > This is simply the construct that the BSDs use to depend on a type > without exposing it. Note that we [usually] expose that type earlier in that same file: #if __POSIX_VISIBLE >= 200112 || __XSI_VISIBLE #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED #endif #endif Apparently, signal.h should not expose pid_t in a strict pre-2001 POSIX environment. Without this restriction, the prototype for kill() would probably use pid_t, as is done in several other files, such as spawn.h: #ifndef _PID_T_DECLARED typedef __pid_t pid_t; #define _PID_T_DECLARED #endif int posix_spawn(pid_t * __restrict, const char * __restrict, ... Let me be clear: Your change is useful and good, and I think you should commit it. I would suggest using the above construct for the __-prefixed types, but it's only a suggestion. Cheers, Eric