--- old/src/java.desktop/share/native/liblcms/lcms2_internal.h 2020-08-27 15:57:52.842102941 -0700 +++ new/src/java.desktop/share/native/liblcms/lcms2_internal.h 2020-08-27 15:57:52.602102945 -0700 @@ -27,10 +27,10 @@ // However, the following notice accompanied the original version of this // file: // - +//--------------------------------------------------------------------------------- // // Little Color Management System -// Copyright (c) 1998-2017 Marti Maria Saguer +// Copyright (c) 1998-2020 Marti Maria Saguer // // Permission is hereby granted, free of charge, to any person obtaining // a copy of this software and associated documentation files (the "Software"), @@ -76,7 +76,7 @@ #endif // BorlandC 5.5, VC2003 are broken on that -#if defined(__BORLANDC__) || (_MSC_VER < 1400) // 1400 == VC++ 8.0 +#if defined(__BORLANDC__) || (defined(_MSC_VER) && (_MSC_VER < 1400)) // 1400 == VC++ 8.0 #define sinf(x) (float)sin((float)x) #define sqrtf(x) (float)sqrt((float)x) #endif @@ -117,6 +117,13 @@ # define cmsINLINE static inline #endif +// Allow signed overflow, we know this is harmless in this particular context +#if defined(__clang__) +# define CMS_NO_SANITIZE __attribute__((no_sanitize("signed-integer-overflow"))) +#else +# define CMS_NO_SANITIZE +#endif + // Other replacement functions #ifdef _MSC_VER # ifndef snprintf @@ -128,12 +135,19 @@ /// Properly define some macros to accommodate /// older MSVC versions. -# if _MSC_VER <= 1700 +# if defined(_MSC_VER) && _MSC_VER <= 1700 #include #define isnan _isnan #define isinf(x) (!_finite((x))) # endif +#if !defined(_MSC_VER) && (defined(__STDC_VERSION__) && __STDC_VERSION__ < 199901L) + #if !defined(isinf) + #define isinf(x) (!finite((x))) + #endif +#endif + + #endif // A fast way to convert from/to 16 <-> 8 bits @@ -964,6 +978,9 @@ // Profile linker -------------------------------------------------------------------------------------------------- +// Link several profiles to obtain a single LUT modelling the whole color transform. Intents, Black point +// compensation and Adaptation parameters may vary across profiles. BPC and Adaptation refers to the PCS +// after the profile. I.e, BPC[0] refers to connexion between profile(0) and profile(1) cmsPipeline* _cmsLinkProfiles(cmsContext ContextID, cmsUInt32Number nProfiles, cmsUInt32Number TheIntents[],