diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2016-09-08 10:30:09 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2016-09-08 10:30:09 +0200 |
| commit | 48c16b2c199210a3c20b306a737eac5fc2c8f6c9 (patch) | |
| tree | 35cefb1c82b55cc19cfac9ef04db410565338b5a /src/lib/openjp2/opj_includes.h | |
| parent | ab22c5bad55fccdc440847c896baaf4bf89365a0 (diff) | |
| parent | ef01f18dfc6780b776d0674ed3e7415c6ef54d24 (diff) | |
Merge branch 'master' of https://github.com/uclouvain/openjpeg into tier1_optimizations_multithreading_2
Conflicts:
src/lib/openjp2/t1.c
Diffstat (limited to 'src/lib/openjp2/opj_includes.h')
| -rw-r--r-- | src/lib/openjp2/opj_includes.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h index e835fae4..66323e94 100644 --- a/src/lib/openjp2/opj_includes.h +++ b/src/lib/openjp2/opj_includes.h @@ -103,12 +103,21 @@ */ /* Are restricted pointers available? (C99) */ -#if (__STDC_VERSION__ != 199901L) +#if (__STDC_VERSION__ >= 199901L) + #define OPJ_RESTRICT restrict +#else /* Not a C99 compiler */ - #ifdef __GNUC__ - #define restrict __restrict__ + #if defined(__GNUC__) + #define OPJ_RESTRICT __restrict__ + +/* + vc14 (2015) outputs wrong results. + Need to check OPJ_RESTRICT usage (or a bug in vc14) + #elif defined(_MSC_VER) && (_MSC_VER >= 1400) + #define OPJ_RESTRICT __restrict +*/ #else - #define restrict /* restrict */ + #define OPJ_RESTRICT /* restrict */ #endif #endif |
