diff options
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | rest/rest-private.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/meson.build b/meson.build index 5fb5956..b090c56 100644 --- a/meson.build +++ b/meson.build @@ -4,6 +4,15 @@ project('rest', 'c', meson_version: '>= 0.56', ) +cc = meson.get_compiler('c') +check_cc_args = [] + +if cc.get_id() == 'msvc' + check_cc_args += ['-Zc:preprocessor'] # Use the more C99-compliant preprocessor +endif + +add_project_arguments(cc.get_supported_arguments(check_cc_args), language: ['c']) + # Versioning librest_module_version = '0.0.0' librest_soversion = '0' diff --git a/rest/rest-private.h b/rest/rest-private.h index 6e71322..6a1a716 100644 --- a/rest/rest-private.h +++ b/rest/rest-private.h @@ -47,9 +47,9 @@ extern guint rest_debug_flags; #define REST_DEBUG_ENABLED(category) (rest_debug_flags & REST_DEBUG_##category) -#define REST_DEBUG(category,x,a...) G_STMT_START { \ +#define REST_DEBUG(category,x,...) G_STMT_START { \ if (REST_DEBUG_ENABLED(category)) \ - { g_message ("[" #category "] " G_STRLOC ": " x, ##a); } \ + { g_message ("[" #category "] " G_STRLOC ": " x, ##__VA_ARGS__); } \ } G_STMT_END void _rest_setup_debugging (void); |