glibc/misc/sys
Siddhesh Poyarekar 602f80ec8b Make __extern_always_inline usable on clang++ again
The fix for BZ #17266 (884ddc5081)
removed changes that had gone into cdefs.h to make
__extern_always_inline usable with clang++.  This patch adds back
support for clang to detect if GNU inlining semantics are available,
this time without breaking the gcc use case.  The check put here is
based on the earlier patch and assertion[1] that checking if
__GNUC_STDC_INLINE__ or __GNUC_GNU_INLINE__ is defined is sufficient
to determine that clang++ suports GNU inlining semantics.

Tested with a simple program that builds with __extern_always_inline
with the patch and fails compilation without it.

 #include <stdio.h>
 #include <sys/cdefs.h>

extern void foo_alias (void) __asm ("foo");

__extern_always_inline void
foo (void)
{
  puts ("hi oh world!");
  return foo_alias ();
}

void
foo_alias (void)
{
  puts ("hell oh world");
}

int
main ()
{
  foo ();
}

[1] https://sourceware.org/ml/libc-alpha/2012-12/msg00306.html

	[BZ #17266]
	* misc/sys/cdefs.h: Define __extern_always_inline for clang
	4.2 and newer.
2014-09-16 22:16:01 +05:30
..
auxv.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
cdefs.h Make __extern_always_inline usable on clang++ again 2014-09-16 22:16:01 +05:30
dir.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
file.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
ioctl.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
mman.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
param.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
queue.h [BZ #5779] 2008-03-05 05:50:39 +00:00
select.h misc/sys/select.h (__FD_MASK): Avoid signed integer overflow. 2014-02-25 14:56:10 +01:00
syslog.h Combine __USE_BSD and __USE_SVID into __USE_MISC. 2014-02-12 23:41:01 +00:00
uio.h Complete _BSD_SOURCE / _SVID_source followup cleanup. 2014-02-21 21:45:26 +00:00
ustat.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
xattr.h misc/sys/xattr.h: guard against linux uapi header inclusion 2014-03-18 14:27:56 +01:00