From owner-svn-src-head@FreeBSD.ORG Fri Jun 19 12:54:23 2015 Return-Path: Delivered-To: svn-src-head@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2AD34499; Fri, 19 Jun 2015 12:54:23 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from theravensnest.org (theraven.freebsd.your.org [216.14.102.27]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cloud.theravensnest.org", Issuer "StartCom Class 1 Primary Intermediate Server CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CC9CE8F; Fri, 19 Jun 2015 12:54:22 +0000 (UTC) (envelope-from theraven@FreeBSD.org) Received: from [172.21.60.147] (global-1-84.nat.csx.cam.ac.uk [131.111.184.84]) (authenticated bits=0) by theravensnest.org (8.15.1/8.15.1) with ESMTPSA id t5JCsJTT067007 (version=TLSv1 cipher=ECDHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 19 Jun 2015 12:54:21 GMT (envelope-from theraven@FreeBSD.org) X-Authentication-Warning: theravensnest.org: Host global-1-84.nat.csx.cam.ac.uk [131.111.184.84] claimed to be [172.21.60.147] Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2098\)) Subject: Re: svn commit: r268137 - head/sys/sys From: David Chisnall In-Reply-To: <558403C4.4040500@selasky.org> Date: Fri, 19 Jun 2015 13:54:15 +0100 Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Transfer-Encoding: quoted-printable Message-Id: References: <201407020845.s628jRG5031824@svn.freebsd.org> <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org> <5583F2C9.1030409@selasky.org> <1EB851FC-CA78-4A7B-BE5D-4F050C61A14C@FreeBSD.org> <558403C4.4040500@selasky.org> To: Hans Petter Selasky X-Mailer: Apple Mail (2.2098) X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jun 2015 12:54:23 -0000 On 19 Jun 2015, at 12:57, Hans Petter Selasky wrote: >=20 > Hi, >=20 >> Then they will get a compile error no matter what GNUstep=E2=80=99s = Foundation.h does. It can=E2=80=99t prevent cdefs.h from redefining = __weak to be something different. >>=20 >=20 > Except "#undef __weak=E2=80=9D Please read the example that I wrote. This will *not* be fixed by = #undef __weak. In particular, the __weak keyword is implemented in = Clang as a pre-defined macro, so after *any* inclusion of any C standard = library header, every program that uses zeroing weak references needs to = redefine __weak to whatever (implementation-defined and subject to = change thing) that the compiler defines it to. >> I=E2=80=99ve just looked at the GNUstep base changelog since that = NetBSD commit and there are no relevant changes, so I=E2=80=99ve no idea = what the NetBSD people are thinking there. >>=20 >=20 > I think we should have a common cross-BSD solution for the proper = definition of __weak, so that user-space applications which use it = follow along. Portable code should not rely on anything in cdefs.h. > Is there a procedure for that? Possibly we should do an exp-run after = changing this to ensure that we don't break more than we fix. I=E2=80=99m not sure what we have any code in ports yet that uses ARC or = GC in Objective-C, but I definitely know of people building out-of-ports = programs on FreeBSD whose code you have just broken (including myself, = though I do Objective-C stuff on 10, so haven=E2=80=99t yet encountered = the breakage). > I'll ask some GNUstep people I know about this. Taking off my FreeBSD Core Team hat and putting on my GNUstep libobjc = maintainer hat: Please fix this and do not define C-family language = keywords or compiler reserved words to be incompatible things in = cdefs.h. David