From owner-freebsd-standards@freebsd.org Sun Jan 10 21:00:43 2016 Return-Path: Delivered-To: freebsd-standards@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 74911A6BD1C for ; Sun, 10 Jan 2016 21:00:43 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 524561C6E for ; Sun, 10 Jan 2016 21:00:43 +0000 (UTC) (envelope-from bugzilla-noreply@FreeBSD.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0AL01YM004728 for ; Sun, 10 Jan 2016 21:00:43 GMT (envelope-from bugzilla-noreply@FreeBSD.org) Message-Id: <201601102100.u0AL01YM004728@kenobi.freebsd.org> From: bugzilla-noreply@FreeBSD.org To: freebsd-standards@FreeBSD.org Subject: Problem reports for freebsd-standards@FreeBSD.org that need special attention Date: Sun, 10 Jan 2016 21:00:43 +0000 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Jan 2016 21:00:43 -0000 To view an individual PR, use: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=(Bug Id). The following is a listing of current problems submitted by FreeBSD users, which need special attention. These represent problem reports covering all versions including experimental development code and obsolete releases. Status | Bug Id | Description ------------+-----------+--------------------------------------------------- Open | 191586 | FreeBSD doesn't validate negative edgecases in bi 1 problems total for which you should take action. From owner-freebsd-standards@freebsd.org Tue Jan 12 06:45:19 2016 Return-Path: Delivered-To: freebsd-standards@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 950F8A6D943 for ; Tue, 12 Jan 2016 06:45:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 863E81EB6 for ; Tue, 12 Jan 2016 06:45:19 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0C6jJVS063991 for ; Tue, 12 Jan 2016 06:45:19 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well Date: Tue, 12 Jan 2016 06:45:19 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: delphij@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 06:45:19 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206146 Bug ID: 206146 Summary: fileno(3) should be implemented as a function; need to check other functions as well Product: Base System Version: 11.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: standards Assignee: freebsd-standards@FreeBSD.org Reporter: delphij@FreeBSD.org Currently, fileno(3) is implemented as a macro in stdio.h: #define fileno(p) (!__isthreaded ? __sfileno(p) : (fileno)(p)) Per discussion with lichray, because this is a macro, it could cause namesp= ace collision with C++ programs that uses the same name, and that could potenti= ally a problem when porting applications to FreeBSD. POSIX, on the other hand, defines fileno as a function. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-standards@freebsd.org Tue Jan 12 09:46:39 2016 Return-Path: Delivered-To: freebsd-standards@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 5C56AA6D7E6 for ; Tue, 12 Jan 2016 09:46:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 4C7151825 for ; Tue, 12 Jan 2016 09:46:39 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0C9kcHX064910 for ; Tue, 12 Jan 2016 09:46:39 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well Date: Tue, 12 Jan 2016 09:46:39 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: des@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 09:46:39 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206146 Dag-Erling Sm=C3=83=C2=B8rgrav changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |des@FreeBSD.org --- Comment #1 from Dag-Erling Sm=C3=83=C2=B8rgrav --- Not so clear-cut: "The following shall be declared as functions and may also be defined as macros. Function prototypes shall be provided." http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-standards@freebsd.org Tue Jan 12 09:57:10 2016 Return-Path: Delivered-To: freebsd-standards@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 35547A6DB3F for ; Tue, 12 Jan 2016 09:57:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 25C291E39 for ; Tue, 12 Jan 2016 09:57:10 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0C9vAJ4084838 for ; Tue, 12 Jan 2016 09:57:10 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well Date: Tue, 12 Jan 2016 09:57:10 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 09:57:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206146 David Chisnall changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |theraven@FreeBSD.org --- Comment #2 from David Chisnall --- I think that's pretty clear. It *must* be a function. It *may* also be a macro. It currently is a function and a macro, but the function is external and so if you #undef the macro you get worse performance. There are a numb= er of cases like this, where we should be defining an inline function instead = of a macro. This also makes building language bridges harder than it needs to be on FreeBSD. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-standards@freebsd.org Tue Jan 12 10:02:18 2016 Return-Path: Delivered-To: freebsd-standards@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 A5BBCA6DDE2 for ; Tue, 12 Jan 2016 10:02:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 963E51283 for ; Tue, 12 Jan 2016 10:02:18 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0CA2I6N029621 for ; Tue, 12 Jan 2016 10:02:18 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well Date: Tue, 12 Jan 2016 10:02:18 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 10:02:18 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206146 --- Comment #3 from David Chisnall --- By the way, libc++ has a load of #undef lines to work around this kind of t= hing for files like cmath. The Solaris libc headers are much nicer to work with from that perspective. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-standards@freebsd.org Tue Jan 12 14:42:56 2016 Return-Path: Delivered-To: freebsd-standards@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 624D0A6CF88 for ; Tue, 12 Jan 2016 14:42:56 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail104.syd.optusnet.com.au (mail104.syd.optusnet.com.au [211.29.132.246]) by mx1.freebsd.org (Postfix) with ESMTP id 2BBAD19DE; Tue, 12 Jan 2016 14:42:55 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail104.syd.optusnet.com.au (Postfix) with ESMTPS id 197104254DF; Wed, 13 Jan 2016 01:22:50 +1100 (AEDT) Date: Wed, 13 Jan 2016 01:22:49 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: bugzilla-noreply@freebsd.org cc: freebsd-standards@freebsd.org Subject: Re: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well In-Reply-To: Message-ID: <20160112233504.W2655@besplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=cK4dyQqN c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=VoiVyQRVVav4-idKbXkA:9 a=PH7D7AkhPnBd5vBO:21 a=OYMT0ZhYKOHK_SaY:21 a=CjuIK1q_8ugA:10 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 14:42:56 -0000 On Tue, 12 Jan 2016 bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206146 > > David Chisnall changed: > > What |Removed |Added > ---------------------------------------------------------------------------- > CC| |theraven@FreeBSD.org > > --- Comment #2 from David Chisnall --- > I think that's pretty clear. It *must* be a function. It *may* also be a The mail unserver doesn't quote context for "that". > macro. It currently is a function and a macro, but the function is external > and so if you #undef the macro you get worse performance. This is correct. The implementation using a macro is about as good as possible. It was a trivial macro before it had the __isthreaded test and is still simple. However, its implementation in the __isthreaded case is nonsense. The file must be locked by the caller to use fileno(). Locking for just the read of of the number is useless without locking in the caller to prevent it changing immiedately after it is read. Locking in the function just gives a more atomic memory access to up more up to date garbage. Don't #undef the macro unless you want worse performance or want to take the function's address. Don't #undef it at all. Just avoid any macro definition by parenthesizing the function name, like does to pessimize the threaded case for getc and putc. > There are a number > of cases like this, where we should be defining an inline function instead of a > macro. > > This also makes building language bridges harder than it needs to be on > FreeBSD. This is mostly backwards. The prototype for the function is required to exist in , and the function is required to exist in libc. These are harder to avoid than any macro. Using inline functions doesn't change this, but increases complications with namespaces for things used in the implementation of the inline functions (the same things in macros have no effect unless the macros are actually used). Bruce From owner-freebsd-standards@freebsd.org Tue Jan 12 15:22:57 2016 Return-Path: Delivered-To: freebsd-standards@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 7BF91A6D02B for ; Tue, 12 Jan 2016 15:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (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 6C6E21B4E for ; Tue, 12 Jan 2016 15:22:57 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id u0CFMvJs071251 for ; Tue, 12 Jan 2016 15:22:57 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-standards@FreeBSD.org Subject: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well Date: Tue, 12 Jan 2016 15:22:57 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: standards X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: theraven@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-standards@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 15:22:57 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D206146 --- Comment #4 from David Chisnall --- Bruce, almost none of what you have said is relevant for C++. --=20 You are receiving this mail because: You are the assignee for the bug.= From owner-freebsd-standards@freebsd.org Tue Jan 12 16:27:41 2016 Return-Path: Delivered-To: freebsd-standards@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 A80B7A8022D for ; Tue, 12 Jan 2016 16:27:41 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail109.syd.optusnet.com.au (mail109.syd.optusnet.com.au [211.29.132.80]) by mx1.freebsd.org (Postfix) with ESMTP id 719AF1FA4; Tue, 12 Jan 2016 16:27:40 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from c211-30-166-197.carlnfd1.nsw.optusnet.com.au (c211-30-166-197.carlnfd1.nsw.optusnet.com.au [211.30.166.197]) by mail109.syd.optusnet.com.au (Postfix) with ESMTPS id 48324D63476; Wed, 13 Jan 2016 03:27:33 +1100 (AEDT) Date: Wed, 13 Jan 2016 03:27:32 +1100 (EST) From: Bruce Evans X-X-Sender: bde@besplex.bde.org To: bugzilla-noreply@freebsd.org cc: freebsd-standards@freebsd.org Subject: Re: [Bug 206146] fileno(3) should be implemented as a function; need to check other functions as well In-Reply-To: Message-ID: <20160113024328.O3284@besplex.bde.org> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Optus-CM-Score: 0 X-Optus-CM-Analysis: v=2.1 cv=PfoC/XVd c=1 sm=1 tr=0 a=KA6XNC2GZCFrdESI5ZmdjQ==:117 a=PO7r1zJSAAAA:8 a=L9H7d07YOLsA:10 a=9cW_t1CCXrUA:10 a=s5jvgZ67dGcA:10 a=JzwRw_2MAAAA:8 a=kj9zAlcOel0A:10 a=6I5d2MoRAAAA:8 a=TGNW48xc-CXdy5OT6WcA:9 a=CjuIK1q_8ugA:10 X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 Jan 2016 16:27:41 -0000 On Tue, 12 Jan 2016 bugzilla-noreply@freebsd.org wrote: > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=206146 > > --- Comment #4 from David Chisnall --- > Bruce, almost none of what you have said is relevant for C++. The user or implementation is including without understanding its namespace and getting full pollution with POSIX support and FreeBSD extensions. I don't want to know about C++, but looked at the implementations in . These only know about the C90 (and maybe C99) function-like APIs that are required to exist as macros. These are handled by #undefing them all. Extensions should be handled by #defining _ANSI_SOURCE, _C99_SOURCE or _C11_SOURCE before including . only has a tiny amount of direct support for C++ (mainly __BEGIN_DECLS, etc.). The c++ is also broken for most or all standard function-like APIs that are not required to be macros. These are permitted to be implemented using (safe) macros. #undefing all of these or knowing which ones need to be #undefed takes more understanding of the C namespace than defining _XXX_SOURCE. gcc handled this better in 2003 or earlier. unconditionally #undef's all (?) 41 of the standard C90 function-like APIs before reusing them in 'namespace std'. Later it does the same for all (?) 5 extensions in C99. It doesn't seem to do anything for POSIX extensions and I doubt that this is handled automatically. Any pre-definitions of _XXX_SOURCE would hide POSIX and FreeBSD extensions in all C headers. Bruce