X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Flib%2Fopenjp2%2Fopj_includes.h;h=58a5a9a9ac070eca5c6d4ca901b20718ad9fc0d7;hb=1da397e94a4e441a7c9a1aa4c2debd1c06ba05e2;hp=f855b7c6694045ebb1108a188971fa28e6d00f0e;hpb=0df90afdf743c85fe943041f5716ca072b4678d1;p=openjpeg.git diff --git a/src/lib/openjp2/opj_includes.h b/src/lib/openjp2/opj_includes.h index f855b7c6..58a5a9a9 100644 --- a/src/lib/openjp2/opj_includes.h +++ b/src/lib/openjp2/opj_includes.h @@ -102,12 +102,6 @@ ========================================================== */ -/* Ignore GCC attributes if this is not GCC */ -#ifndef __GNUC__ - #define __attribute__(x) /* __attribute__(x) */ -#endif - - /* Are restricted pointers available? (C99) */ #if (__STDC_VERSION__ != 199901L) /* Not a C99 compiler */ @@ -118,6 +112,14 @@ #endif #endif +#ifdef __has_attribute + #if __has_attribute(no_sanitize) + #define OPJ_NOSANITIZE(kind) __attribute__((no_sanitize(kind))) + #endif +#endif +#ifndef OPJ_NOSANITIZE + #define OPJ_NOSANITIZE(kind) +#endif /* MSVC before 2013 and Borland C do not have lrintf */