mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-22 08:17:01 +00:00
macros: Define restrict keyword if not available
This change always defines the restrict keyword if a non-C99 C compiler is used. In the case of GCC >= 4 it will be defined to __restrict__, in all other cases to nothing. This allows to use the restrict keyword unconditionally.
This commit is contained in:
parent
0ad9a954fe
commit
a797b9f22b
1 changed files with 8 additions and 0 deletions
|
@ -39,6 +39,14 @@ G_BEGIN_DECLS
|
|||
# undef GST_CAN_INLINE
|
||||
#endif
|
||||
|
||||
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict)
|
||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define restrict __restrict__
|
||||
# else
|
||||
# define restrict
|
||||
# endif
|
||||
#endif
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __GST_MACROS_H__ */
|
||||
|
|
Loading…
Reference in a new issue