build-sys: add restrict keyword fallback

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2021-01-22 13:28:02 +01:00
parent 33b09aebf5
commit 7397f2c1f9
1 changed files with 15 additions and 0 deletions

View File

@ -64,6 +64,21 @@
# define ignore_result(x) ((void) (x))
#endif /* !__GNUC__ */
/* "restrict" keyword fallback */
#if __STDC__ != 1
# define restrict __restrict /* use implementation __ format */
#else
# ifndef __STDC_VERSION__
# define restrict __restrict /* use implementation __ format */
# else
# if __STDC_VERSION__ < 199901L
# define restrict __restrict /* use implementation __ format */
# endif
# endif
#endif
/*
* It evaluates to 1 if the attribute/feature is supported by the current
* compilation target. Fallback for old compilers.