[babl/wip/msvc: 8/20] meson.build: Use strtok_s() on MSVC in place of strtok_r()



commit a2e14007857faf8ead507893de6ba0d97a61498b
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jan 20 16:38:18 2020 +0800

    meson.build: Use strtok_s() on MSVC in place of strtok_r()
    
    Visual Studio supports strtok_s(), which is semantically similar to strtok_s()

 meson.build | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/meson.build b/meson.build
index 2029abd33..77d816ba3 100644
--- a/meson.build
+++ b/meson.build
@@ -178,6 +178,7 @@ if cc.get_id() == 'msvc'
     '-D_USE_MATH_DEFINES', # Allow more math macro usage
     '-DUSE_ALLOCA',        # Use alloca via _alloca()
     '-Dalloca=_alloca',
+    '-Dstrtok_r=strtok_s', # Use strtok_s in place of strtok_r
     '-wd4244',             # Silence some unneeded compiler warnings
     '-wd4305'
   ]


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