mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 01:00:37 +00:00
gstmacros.h: Fix restrict definition on MSVC
Turns out it's exposed as `__restrict`, not as `restrict`. https://gitlab.freedesktop.org/gstreamer/gstreamer/merge_requests/95#note_120782
This commit is contained in:
parent
ea4b086142
commit
a1447b036c
1 changed files with 3 additions and 1 deletions
|
@ -42,9 +42,11 @@ G_BEGIN_DECLS
|
|||
#endif
|
||||
|
||||
/* MSVC defines 'restrict' as a keyword and not a define */
|
||||
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(_MSC_VER) && !defined(restrict)
|
||||
#if (!defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L) && !defined(restrict)
|
||||
# if defined(__GNUC__) && __GNUC__ >= 4
|
||||
# define restrict __restrict__
|
||||
# elif defined(_MSC_VER)
|
||||
# define restrict __restrict
|
||||
# else
|
||||
# define restrict
|
||||
# endif
|
||||
|
|
Loading…
Reference in a new issue