diff options
author | sezero <sezero@users.sourceforge.net> | 2019-11-12 01:10:20 +0300 |
---|---|---|
committer | sezero <sezero@users.sourceforge.net> | 2019-11-12 01:10:20 +0300 |
commit | af64c9331e53cbc3c505b2c8c15666532e369004 (patch) | |
tree | faa83402e854d3ef2b2c40c78b9151b48c5dc141 | |
parent | 46108887d2013c18ab221503f68e34df7caa6269 (diff) |
do not define LODEPNG_RESTRICT Open Watcom in C++ mode.
see https://github.com/open-watcom/open-watcom-v2/issues/551
-rw-r--r-- | lodepng.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lodepng.cpp b/lodepng.cpp index 79d5baa..0fd1383 100644 --- a/lodepng.cpp +++ b/lodepng.cpp @@ -105,7 +105,8 @@ void lodepng_free(void* ptr); /* 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)) ||\ - (defined(_MSC_VER) && (_MSC_VER >= 1400)) || (defined(__WATCOMC__) && (__WATCOMC__ >= 1250)) + (defined(_MSC_VER) && (_MSC_VER >= 1400)) || \ + (defined(__WATCOMC__) && (__WATCOMC__ >= 1250) && !defined(__cplusplus)) #define LODEPNG_RESTRICT __restrict #else #define LODEPNG_RESTRICT /* not available */ |