Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/GStreamer/orc.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim@centricular.com>2022-10-30 01:44:27 +0300
committerTim-Philipp Müller <tim@centricular.com>2022-10-30 19:12:30 +0300
commit73f457cafedd38b29c3eb19bad8043e3f13c2ad9 (patch)
treed95c406b78619f8213b896154ed1ba53136493d3
parent4b07214b9137b15291ea010004c664b983b3f125 (diff)
orc: fix ORC_RESTRICT definition for MSVC
Fixes #40
-rw-r--r--orc/orcemulateopcodes.c2
-rw-r--r--orc/orcfunctions.c2
-rw-r--r--orc/orcfunctions.h2
-rw-r--r--orc/orcprogram-c.c2
4 files changed, 8 insertions, 0 deletions
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"