diff options
Diffstat (limited to 'manual tests')
-rw-r--r-- | manual tests/2 multiwrap/meson.build | 9 | ||||
-rw-r--r-- | manual tests/2 multiwrap/prog.c | 4 |
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) { |