Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 19 Jun 2015 11:16:40 +0100
From:      David Chisnall <theraven@FreeBSD.org>
To:        Hans Petter Selasky <hselasky@FreeBSD.org>
Cc:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   Re: svn commit: r268137 - head/sys/sys
Message-ID:  <5BE3492F-86A0-4CE3-A27C-8DB5EB662C64@FreeBSD.org>
In-Reply-To: <201407020845.s628jRG5031824@svn.freebsd.org>
References:  <201407020845.s628jRG5031824@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
I only just caught this (having seen the fallout from NetBSD doing the =
same thing in a shipping release and the pain that it=E2=80=99s caused):

__weak is a reserved keyword in Objective-C, please pick another name =
for this.  This in cdefs.h makes it impossible to include any FreeBSD =
standard headers in Objective-C programs (of which we have a couple of =
hundred in ports) if they use any of the modern Objective-C language =
modes.

David

> On 2 Jul 2014, at 09:45, Hans Petter Selasky <hselasky@FreeBSD.org> =
wrote:
>=20
> Author: hselasky
> Date: Wed Jul  2 08:45:26 2014
> New Revision: 268137
> URL: http://svnweb.freebsd.org/changeset/base/268137
>=20
> Log:
>  Define a "__weak" macro for declaring symbols "weak".
>=20
> Modified:
>  head/sys/sys/cdefs.h
>=20
> Modified: head/sys/sys/cdefs.h
> =
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
> --- head/sys/sys/cdefs.h	Wed Jul  2 05:45:40 2014	=
(r268136)
> +++ head/sys/sys/cdefs.h	Wed Jul  2 08:45:26 2014	=
(r268137)
> @@ -210,7 +210,9 @@
> #define	__packed
> #define	__aligned(x)
> #define	__section(x)
> +#define	__weak
> #else
> +#define	__weak		__attribute__((__weak__))
> #if !__GNUC_PREREQ__(2, 5) && !defined(__INTEL_COMPILER)
> #define	__dead2
> #define	__pure2
>=20




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5BE3492F-86A0-4CE3-A27C-8DB5EB662C64>