summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-08-13 19:48:41 +0200
committerDavid Robillard <d@drobilla.net>2020-08-14 09:43:38 +0200
commitb52e3f8db950cc8f3397fad00d0fcc8e611004f7 (patch)
tree59ff12f518308d36befb5b854dd73815ed8b8210
parentf8b396210aa3247a64c890a69a7d059513797607 (diff)
downloadzix-b52e3f8db950cc8f3397fad00d0fcc8e611004f7.tar.gz
zix-b52e3f8db950cc8f3397fad00d0fcc8e611004f7.tar.bz2
zix-b52e3f8db950cc8f3397fad00d0fcc8e611004f7.zip
Remove workarounds for ancient versions of MSVC
-rw-r--r--test/sorted_array_test.c7
-rw-r--r--test/tree_test.c7
-rw-r--r--wscript1
-rw-r--r--zix/common.h4
-rw-r--r--zix/sem.h4
-rw-r--r--zix/thread.h4
-rw-r--r--zix/tree_debug.h4
7 files changed, 10 insertions, 21 deletions
diff --git a/test/sorted_array_test.c b/test/sorted_array_test.c
index 4bfd515..db7c1d0 100644
--- a/test/sorted_array_test.c
+++ b/test/sorted_array_test.c
@@ -17,18 +17,13 @@
#include "zix/common.h"
#include "zix/sorted_array.h"
+#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#ifdef _MSC_VER
-# define PRIdPTR "Id"
-#else
-# include <inttypes.h>
-#endif
-
static unsigned seed = 1;
static int
diff --git a/test/tree_test.c b/test/tree_test.c
index 3e35fb3..52caede 100644
--- a/test/tree_test.c
+++ b/test/tree_test.c
@@ -18,18 +18,13 @@
#include "zix/common.h"
+#include <inttypes.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
-#ifdef _MSC_VER
-# define PRIdPTR "Id"
-#else
-# include <inttypes.h>
-#endif
-
static unsigned seed = 1;
static int
diff --git a/wscript b/wscript
index f7854ae..06bc978 100644
--- a/wscript
+++ b/wscript
@@ -69,6 +69,7 @@ def configure(conf):
'/wd4365', # signed/unsigned mismatch
'/wd4514', # unreferenced inline function has been removed
'/wd4706', # assignment within conditional expression
+ '/wd4777', # format string and argument mismatch
'/wd4820', # padding added after construct
'/wd5045', # will insert Spectre mitigation for memory load
],
diff --git a/zix/common.h b/zix/common.h
index e427885..3271858 100644
--- a/zix/common.h
+++ b/zix/common.h
@@ -17,6 +17,8 @@
#ifndef ZIX_COMMON_H
#define ZIX_COMMON_H
+#include <stdbool.h>
+
/**
@addtogroup zix
@{
@@ -48,8 +50,6 @@
#ifdef __cplusplus
extern "C" {
-#else
-# include <stdbool.h>
#endif
#ifdef __GNUC__
diff --git a/zix/sem.h b/zix/sem.h
index 24bc446..faeb148 100644
--- a/zix/sem.h
+++ b/zix/sem.h
@@ -19,8 +19,6 @@
#include "zix/common.h"
-#include <stdbool.h>
-
#ifdef __APPLE__
# include <mach/mach.h>
#elif defined(_WIN32)
@@ -35,6 +33,8 @@
extern "C" {
#endif
+#include <stdbool.h>
+
/**
@addtogroup zix
@{
diff --git a/zix/thread.h b/zix/thread.h
index e2b59c4..b7956d2 100644
--- a/zix/thread.h
+++ b/zix/thread.h
@@ -19,8 +19,6 @@
#include "zix/common.h"
-#include <stdbool.h>
-
#ifdef _WIN32
# include <windows.h>
#else
@@ -28,6 +26,8 @@
# include <pthread.h>
#endif
+#include <stdbool.h>
+
#ifdef __cplusplus
extern "C" {
#endif
diff --git a/zix/tree_debug.h b/zix/tree_debug.h
index e903265..ff9311e 100644
--- a/zix/tree_debug.h
+++ b/zix/tree_debug.h
@@ -17,9 +17,7 @@
#ifndef ZIX_TREE_DEBUG_H
#define ZIX_TREE_DEBUG_H
-#ifndef _MSC_VER
-# include <inttypes.h>
-#endif
+#include <inttypes.h>
#ifdef ZIX_TREE_DUMP
static void