Skip to content

Commit

Permalink
circumvent Visual Studio 2019 "partial" support of C11
Browse files Browse the repository at this point in the history
use _Alignas() instead, to not rely on including <stdalign.h>
since some versions of VS2019 do not provide it
despite claiming C11 compliance.
  • Loading branch information
Cyan4973 committed Oct 3, 2024
1 parent b8067e1 commit 8ffd354
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions xxhash.h
Original file line number Diff line number Diff line change
Expand Up @@ -1688,8 +1688,7 @@ struct XXH64_state_s {
#ifndef XXH_NO_XXH3

#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* >= C11 */
# include <stdalign.h>
# define XXH_ALIGN(n) alignas(n)
# define XXH_ALIGN(n) _Alignas(n)
#elif defined(__cplusplus) && (__cplusplus >= 201103L) /* >= C++11 */
/* In C++ alignas() is a keyword */
# define XXH_ALIGN(n) alignas(n)
Expand Down

0 comments on commit 8ffd354

Please sign in to comment.