aboutsummaryrefslogtreecommitdiff
path: root/manual tests
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2015-02-06 20:08:58 +0200
committerJussi Pakkanen <jpakkane@gmail.com>2015-02-06 20:08:58 +0200
commit704a0b617c5caca42326fa31d04792afd33f01a0 (patch)
tree6d065caf697168992f83d9f9eaa99b06f233fde3 /manual tests
parent26b7127c28787743e6dbb08777fa5eecfaeaf106 (diff)
downloadmeson-704a0b617c5caca42326fa31d04792afd33f01a0.zip
meson-704a0b617c5caca42326fa31d04792afd33f01a0.tar.gz
meson-704a0b617c5caca42326fa31d04792afd33f01a0.tar.bz2
A few tweaks for msvc.
Diffstat (limited to 'manual tests')
-rw-r--r--manual tests/2 multiwrap/meson.build9
-rw-r--r--manual tests/2 multiwrap/prog.c4
2 files changed, 10 insertions, 3 deletions
diff --git a/manual tests/2 multiwrap/meson.build b/manual tests/2 multiwrap/meson.build
index 28f4e2b..81337ad 100644
--- a/manual tests/2 multiwrap/meson.build
+++ b/manual tests/2 multiwrap/meson.build
@@ -2,7 +2,12 @@ project('multiwrap', 'c')
# Using multiple downloaded projects for great justice.
-add_global_arguments('-std=c99', language : 'c')
+if meson.get_compiler('c').get_id() != 'msvc'
+ add_global_arguments('-std=c99', language : 'c')
+ extra_libs = ['-lm']
+else
+ extra_libs = []
+endif
luap = subproject('lua')
pngp = subproject('libpng')
@@ -10,4 +15,4 @@ pngp = subproject('libpng')
executable('prog', 'prog.c',
include_directories : [pngp.get_variable('incdir'), luap.get_variable('incdir')],
link_with :[pngp.get_variable('libpng'), luap.get_variable('lualib')],
-link_args : '-lm')
+link_args : extra_libs)
diff --git a/manual tests/2 multiwrap/prog.c b/manual tests/2 multiwrap/prog.c
index 13a5e03..dd0349e 100644
--- a/manual tests/2 multiwrap/prog.c
+++ b/manual tests/2 multiwrap/prog.c
@@ -2,8 +2,10 @@
#include<stdio.h>
#include<stdlib.h>
#include<png.h>
-#include<unistd.h>
#include<string.h>
+#if !defined(_MSC_VER)
+#include<unistd.h>
+#endif
static void *l_alloc (void *ud, void *ptr, size_t osize,
size_t nsize) {