Mercurial > gnulib
changeset 39920:e09facd7352a
libc-config: merge from glibc
* lib/cdefs.h (__glibc_has_attribute): New macro.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Mon, 15 Oct 2018 00:37:55 -0500 |
parents | 9c237a90e50c |
children | a52296bb5b69 |
files | ChangeLog lib/cdefs.h |
diffstat | 2 files changed, 9 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Mon Oct 15 00:17:34 2018 -0500 +++ b/ChangeLog Mon Oct 15 00:37:55 2018 -0500 @@ -1,5 +1,8 @@ 2018-10-15 Paul Eggert <eggert@cs.ucla.edu> + libc-config: merge from glibc + * lib/cdefs.h (__glibc_has_attribute): New macro. + regex: depend on libc-config * modules/regex (Depends-on): Add libc-config. This is needed after the recent autoupdate from glibc.
--- a/lib/cdefs.h Mon Oct 15 00:17:34 2018 -0500 +++ b/lib/cdefs.h Mon Oct 15 00:37:55 2018 -0500 @@ -409,6 +409,12 @@ # define __glibc_likely(cond) (cond) #endif +#ifdef __has_attribute +# define __glibc_has_attribute(attr) __has_attribute (attr) +#else +# define __glibc_has_attribute(attr) 0 +#endif + #if (!defined _Noreturn \ && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \ && !__GNUC_PREREQ (4,7))