aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/jalv.c13
-rw-r--r--wscript6
2 files changed, 14 insertions, 5 deletions
diff --git a/src/jalv.c b/src/jalv.c
index d17ffb1..74ea4bd 100644
--- a/src/jalv.c
+++ b/src/jalv.c
@@ -19,16 +19,21 @@
#include <assert.h>
#include <math.h>
#include <signal.h>
-#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
+
+#ifndef __cplusplus
+# include <stdbool.h>
+#endif
#ifdef _WIN32
# include <io.h> /* for _mktemp */
+# define snprintf _snprintf
+#else
+# include <sys/stat.h>
+# include <sys/types.h>
+# include <unistd.h>
#endif
#include "jalv_config.h"
diff --git a/wscript b/wscript
index 4df5a6d..4d4fc11 100644
--- a/wscript
+++ b/wscript
@@ -29,6 +29,11 @@ def configure(conf):
autowaf.configure(conf)
autowaf.display_header('Jalv Configuration')
+ if conf.env['MSVC_COMPILER']:
+ conf.env.append_unique('CFLAGS', ['-TP', '-MD'])
+ else:
+ conf.env.append_unique('CFLAGS', '-std=c99')
+
autowaf.check_pkg(conf, 'lv2', atleast_version='1.0.5', uselib_store='LV2')
autowaf.check_pkg(conf, 'lilv-0', uselib_store='LILV',
atleast_version='0.14.0', mandatory=True)
@@ -57,7 +62,6 @@ def configure(conf):
if not Options.options.no_jack_session:
autowaf.define(conf, 'JALV_JACK_SESSION', 1)
- conf.env.append_unique('CFLAGS', '-std=c99')
autowaf.define(conf, 'JALV_VERSION', JALV_VERSION)
conf.write_config_header('jalv_config.h', remove=False)