]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Implement ZSTD_ALIGNED for ms compiler 4258/head
authorPavel P <pavlov.pavel@gmail.com>
Tue, 21 Jan 2025 00:33:25 +0000 (02:33 +0200)
committerPavel P <pavlov.pavel@gmail.com>
Tue, 21 Jan 2025 00:33:25 +0000 (02:33 +0200)
lib/common/compiler.h

index 6fd2d08e7317384d5dd29d32b262aeece5f0e33e..b12de3edc67a31dca2c3892f744d70bc7e709fd2 100644 (file)
@@ -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(...)