fix to solaris restrict keyword with c++

This commit is contained in:
Travers 2021-02-22 09:41:20 -08:00
parent 01fc2e6294
commit c865e556c9

View File

@ -2679,8 +2679,9 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
/* === Compiler specifics === */
/* === Compiler specifics === */
#if defined(sun) || defined(__sun)
#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */
# define XXH_RESTRICT /* disable */
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
# define XXH_RESTRICT /* disable */
#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
# define XXH_RESTRICT restrict