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:
Nirbheek Chauhan 2019-02-20 17:51:40 +05:30
parent ea4b086142
commit a1447b036c

View file

@ -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