[libsoup/master.msvc] meson.build: Define ssize_t for MSVC-style builds




commit cdfbe8ada59c85d9d6a11a0ab4d59a5968cc8178
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Tue Sep 28 18:11:08 2021 +0800

    meson.build: Define ssize_t for MSVC-style builds
    
    This is necessary as we are using nghttp2 which uses ssize_t, which is not
    defined by Microsoft's standard headers, and it is actually a part of POSIX.

 meson.build | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/meson.build b/meson.build
index 93ba9d42..5a41b3be 100644
--- a/meson.build
+++ b/meson.build
@@ -48,6 +48,12 @@ common_flags = [
 ]
 
 cc = meson.get_compiler('c')
+
+# define ssize_t as Microsoft's headers do not define it
+if cc.get_argument_syntax() == 'msvc'
+  add_project_arguments('-Dssize_t=gssize', language: 'c')
+endif
+
 # Enable extra warnings if compiler supports them.
 if cc.get_id() == 'msvc'
   common_flags += ['/FImsvc_recommended_pragmas.h']


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]