lodepng.c: fix LODEPNG_RESTRICT for gcc

previously, it ignored any gcc with __GNUC_MINOR__ == 0.
(patch submitted to upstream at github as PR/120)

git-svn-id: svn://svn.code.sf.net/p/quakespasm/code/trunk/quakespasm@1652 af15c1b1-3010-417e-b628-4374ebc0bcbd
This commit is contained in:
Ozkan Sezer 2019-11-18 09:47:04 +00:00
parent 93aca471a3
commit 6abf2afbe6

View file

@ -96,7 +96,7 @@ void lodepng_free(void* ptr);
#endif /*LODEPNG_COMPILE_ALLOCATORS*/
/* restrict is not available in C90, but use it when supported by the compiler */
#if (defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1)) ||\
#if (defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))) ||\
(defined(_MSC_VER) && (_MSC_VER >= 1400)) || \
(defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus))
#define LODEPNG_RESTRICT __restrict