mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-03-30 12:49:40 +00:00
gstmacros.h: Fix check for 'restrict' keyword
MSVC also defines it as a keyword. Fixes build errors in projects that include MSVC's xkeycheck.h which ensures that keywords aren't overriden with a define.
This commit is contained in:
parent
790f193d63
commit
ea4b086142
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ G_BEGIN_DECLS
|
||||||
# undef GST_CAN_INLINE
|
# undef GST_CAN_INLINE
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict)
|
/* MSVC defines 'restrict' as a keyword and not a define */
|
||||||
|
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(_MSC_VER) && !defined(restrict)
|
||||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||||
# define restrict __restrict__
|
# define restrict __restrict__
|
||||||
# else
|
# else
|
||||||
|
|
Loading…
Reference in a new issue