<sys/cdefs.h>: Add __glibc_has_include macro
diff mbox series

Message ID 87sgsouozv.fsf@oldenburg2.str.redhat.com
State New
Headers show
Series
  • <sys/cdefs.h>: Add __glibc_has_include macro
Related show

Commit Message

Florian Weimer June 5, 2019, 1:43 p.m. UTC
2019-06-05  Florian Weimer  <fweimer@redhat.com>

	* misc/sys/cdefs.h (__glibc_has_include): Define.

Comments

Florian Weimer June 12, 2019, 8:49 a.m. UTC | #1
* Florian Weimer:

> 2019-06-05  Florian Weimer  <fweimer@redhat.com>
>
> 	* misc/sys/cdefs.h (__glibc_has_include): Define.
>
> diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
> index b1695376dc..638872b87b 100644
> --- a/misc/sys/cdefs.h
> +++ b/misc/sys/cdefs.h
> @@ -412,6 +412,12 @@
>  # define __glibc_has_attribute(attr)	0
>  #endif
>  
> +#ifdef __has_include
> +# define __glibc_has_include(header)	__has_include (header)
> +#else
> +# define __glibc_has_include(header)	0
> +#endif
> +
>  #if (!defined _Noreturn \
>       && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
>       &&  !__GNUC_PREREQ (4,7))

I'm going to push this shortly, as a dependency of the <sys/stat.h>
patch.

Thanks,
Florian

Patch
diff mbox series

diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index b1695376dc..638872b87b 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -412,6 +412,12 @@ 
 # define __glibc_has_attribute(attr)	0
 #endif
 
+#ifdef __has_include
+# define __glibc_has_include(header)	__has_include (header)
+#else
+# define __glibc_has_include(header)	0
+#endif
+
 #if (!defined _Noreturn \
      && (defined __STDC_VERSION__ ? __STDC_VERSION__ : 0) < 201112 \
      &&  !__GNUC_PREREQ (4,7))