[PATCH] Fix up definitions for older G++
Dmitry V. Levin
ldv@altlinux.org
Thu Sep 20 14:45:00 GMT 2012
On Sat, Sep 08, 2012 at 01:25:01PM +0200, Marek Polacek wrote:
> On Thu, Sep 06, 2012 at 09:52:22AM +0200, Andreas Jaeger wrote:
> > I guess that's the best alternative for now,
>
> Like this? It's unfortunately more hairy than it should be :(.
> Tested x86_64 and tried with gcc 4.[123]/trunk.
>
> 2012-09-08 Marek Polacek <polacek@redhat.com>
>
> [BZ #14530]
> [BZ #13741]
> * misc/sys/cdefs.h: Define __extern_inline and __extern_always_inline
> for C++ and GCC <4.3 as well as for non GCC compilers.
>
> --- libc/misc/sys/cdefs.h.mp2 2012-08-31 11:52:24.778971804 +0200
> +++ libc/misc/sys/cdefs.h 2012-09-08 12:00:10.322502382 +0200
[...]
> +#elif defined __GNUC__ /* C++ and GCC <4.3. */
> +# define __extern_inline extern __inline
> +# define __extern_always_inline \
> + extern __always_inline
This would define __USE_EXTERN_INLINES for 2.6 <= g++ < 4.3 and
consequently enable more code in various glibc headers for these
compilers. It looks OK, though I haven't checked all code paths.
--
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120920/b7afd1ac/attachment.sig>
More information about the Libc-alpha
mailing list