From: Pavel P Date: Tue, 21 Jan 2025 00:33:25 +0000 (+0200) Subject: Implement ZSTD_ALIGNED for ms compiler X-Git-Tag: v1.5.7^2~21^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a0872a837294ae9b18967e9e80342587f3089fb0;p=thirdparty%2Fzstd.git Implement ZSTD_ALIGNED for ms compiler --- diff --git a/lib/common/compiler.h b/lib/common/compiler.h index 6fd2d08e7..b12de3edc 100644 --- a/lib/common/compiler.h +++ b/lib/common/compiler.h @@ -321,6 +321,8 @@ MEM_STATIC int ZSTD_isPower2(size_t u) { # define ZSTD_ALIGNED(a) __attribute__((aligned(a))) # elif defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 201112L) /* C11 */ # define ZSTD_ALIGNED(a) alignas(a) +#elif defined(_MSC_VER) +# define ZSTD_ALIGNED(n) __declspec(align(n)) # else /* this compiler will require its own alignment instruction */ # define ZSTD_ALIGNED(...)