From deca3c5b82effc4db33fc7d2f19fb444428185f7 Mon Sep 17 00:00:00 2001 From: Kobayashi Daisuke Date: Sat, 7 Sep 2024 11:24:42 +0900 Subject: [PATCH] =?UTF-8?q?MSVC=E3=81=A7=E3=81=AFmulti2.c,=20multi2=5Fsimd?= =?UTF-8?q?.c=E3=82=92=E3=80=81MinGW/Linux=E3=81=A7=E3=81=AFmulti2.cc?= =?UTF-8?q?=E3=82=92=E4=BD=BF=E3=81=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakeLists.txt | 4 ++-- aribb25/multi2.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f29c37..1c45291 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -138,7 +138,7 @@ link_directories(${PCSC_LIBRARY_DIRS}) # ---------- libaribb1 ---------- -if(WIN32 AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(ARM|ARM64|AARCH64)") +if(CMAKE_C_COMPILER_ID MATCHES "MSVC") add_library(aribb1-objlib OBJECT aribb25/arib_std_b25.c aribb25/b_cas_card.c aribb25/multi2.c aribb25/multi2_simd.c aribb25/ts_section_parser.c aribb25/version_b1.c) else() add_library(aribb1-objlib OBJECT aribb25/arib_std_b25.c aribb25/b_cas_card.c aribb25/multi2.cc aribb25/ts_section_parser.c aribb25/version_b1.c) @@ -186,7 +186,7 @@ configure_file(aribb25/version_b1.rc.in version_b1.rc @ONLY) # ---------- libaribb25 ---------- -if(WIN32 AND NOT CMAKE_SYSTEM_PROCESSOR MATCHES "(ARM|ARM64|AARCH64)") +if(CMAKE_C_COMPILER_ID MATCHES "MSVC") add_library(aribb25-objlib OBJECT aribb25/arib_std_b25.c aribb25/b_cas_card.c aribb25/multi2.c aribb25/multi2_simd.c aribb25/ts_section_parser.c aribb25/version_b25.c) else() add_library(aribb25-objlib OBJECT aribb25/arib_std_b25.c aribb25/b_cas_card.c aribb25/multi2.cc aribb25/ts_section_parser.c aribb25/version_b25.c) diff --git a/aribb25/multi2.h b/aribb25/multi2.h index f05ecd3..4f7bb1a 100644 --- a/aribb25/multi2.h +++ b/aribb25/multi2.h @@ -20,7 +20,7 @@ typedef struct { int (* clear_scramble_key)(void *m2); int (* encrypt)(void *m2, int32_t type, uint8_t *buf, int32_t size); -#ifdef ENABLE_MULTI2_SIMD +#if defined(_MSC_VER) int (* decrypt)(void *m2, int32_t type, uint8_t *buf, intptr_t size); #else int (* decrypt)(void *m2, int32_t type, uint8_t *buf, int32_t size);