From 73f457cafedd38b29c3eb19bad8043e3f13c2ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tim-Philipp=20M=C3=BCller?= Date: Sat, 29 Oct 2022 23:44:27 +0100 Subject: orc: fix ORC_RESTRICT definition for MSVC Fixes #40 --- orc/orcemulateopcodes.c | 2 ++ orc/orcfunctions.c | 2 ++ orc/orcfunctions.h | 2 ++ orc/orcprogram-c.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/orc/orcemulateopcodes.c b/orc/orcemulateopcodes.c index ff09dd2..16c96f1 100644 --- a/orc/orcemulateopcodes.c +++ b/orc/orcemulateopcodes.c @@ -44,6 +44,8 @@ #define ORC_RESTRICT restrict #elif defined(__GNUC__) && __GNUC__ >= 4 #define ORC_RESTRICT __restrict__ +#elif defined(_MSC_VER) +#define ORC_RESTRICT __restrict #else #define ORC_RESTRICT #endif diff --git a/orc/orcfunctions.c b/orc/orcfunctions.c index e1dc477..3ddc501 100644 --- a/orc/orcfunctions.c +++ b/orc/orcfunctions.c @@ -56,6 +56,8 @@ typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 #define ORC_RESTRICT restrict #elif defined(__GNUC__) && __GNUC__ >= 4 #define ORC_RESTRICT __restrict__ +#elif defined(_MSC_VER) +#define ORC_RESTRICT __restrict #else #define ORC_RESTRICT #endif diff --git a/orc/orcfunctions.h b/orc/orcfunctions.h index a47e508..971020c 100644 --- a/orc/orcfunctions.h +++ b/orc/orcfunctions.h @@ -63,6 +63,8 @@ typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 #define ORC_RESTRICT restrict #elif defined(__GNUC__) && __GNUC__ >= 4 #define ORC_RESTRICT __restrict__ +#elif defined(_MSC_VER) +#define ORC_RESTRICT __restrict #else #define ORC_RESTRICT #endif diff --git a/orc/orcprogram-c.c b/orc/orcprogram-c.c index 0639867..9aeee9e 100644 --- a/orc/orcprogram-c.c +++ b/orc/orcprogram-c.c @@ -80,6 +80,8 @@ orc_target_c_get_typedefs (void) "#define ORC_RESTRICT restrict\n" "#elif defined(__GNUC__) && __GNUC__ >= 4\n" "#define ORC_RESTRICT __restrict__\n" + "#elif defined(_MSC_VER)\n" + "#define ORC_RESTRICT __restrict\n" "#else\n" "#define ORC_RESTRICT\n" "#endif\n" -- cgit v1.2.3