mirror of
https://gitlab.com/sortix/sortix.git
synced 2023-02-13 20:55:38 -05:00
Provide the restrict keyword in all system components.
This commit is contained in:
parent
bea3ed6f50
commit
8044afc7e8
1 changed files with 7 additions and 2 deletions
|
@ -90,6 +90,11 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Provide the restrict keyword when building system components. */
|
||||||
|
#if __is_sortix_system_component && !defined(__want_restrict)
|
||||||
|
#define __want_restrict 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Detect whether the restrict keyword is available. */
|
/* Detect whether the restrict keyword is available. */
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if __STDC_VERSION__ >= 199901L
|
||||||
#define __HAS_RESTRICT 1
|
#define __HAS_RESTRICT 1
|
||||||
|
@ -103,8 +108,8 @@
|
||||||
#define __restrict restrict
|
#define __restrict restrict
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Provide the restrict keyword when building the C library. */
|
/* Provide the restrict keyword if requested and unavailable. */
|
||||||
#if !__HAS_RESTRICT && defined(__is_sortix_libc)
|
#if !__HAS_RESTRICT && __want_restrict
|
||||||
#define restrict __restrict
|
#define restrict __restrict
|
||||||
#undef __HAS_RESTRICT
|
#undef __HAS_RESTRICT
|
||||||
#define __HAS_RESTRICT 2
|
#define __HAS_RESTRICT 2
|
||||||
|
|
Loading…
Reference in a new issue