File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change 33
44#include "./user-check.h"
55
6- #ifdef _WIN32
6+ #ifdef _MSC_VER
77#include "./windows-lean.h"
88#else
99#include <pthread.h>
1515 * @brief A status object for @ref mlib_call_once.
1616 */
1717typedef struct mlib_once_flag {
18- #ifdef _WIN32
18+ #ifdef _MSC_VER
1919 INIT_ONCE _native ;
2020#else
2121 pthread_once_t _native ;
@@ -27,7 +27,7 @@ typedef struct mlib_once_flag {
2727 * @ref mlib_once_flag object. Can also be used to dynamically initialize or
2828 * "reset" a flag.
2929 */
30- #ifdef _WIN32
30+ #ifdef _MSC_VER
3131#define MLIB_ONCE_INITIALIZER \
3232 { ._native = INIT_ONCE_STATIC_INIT }
3333#else
@@ -40,7 +40,7 @@ typedef struct mlib_once_flag {
4040 */
4141typedef void (* mlib_init_once_fn_t )(void );
4242
43- #if defined(_WIN32 )
43+ #if defined(_MSC_VER )
4444/**
4545 * An indirection layer for mlib_once on Windows platforms. Do not use directly.
4646 */
@@ -68,7 +68,7 @@ static inline BOOL WINAPI _mlib_win32_once_callthru(PINIT_ONCE once, PVOID param
6868 * @return true on success, false otherwise
6969 */
7070static inline bool mlib_call_once (mlib_once_flag * flag , mlib_init_once_fn_t fn ) {
71- #ifdef _WIN32
71+ #if defined( _MSC_VER )
7272 bool okay = InitOnceExecuteOnce (& flag -> _native , & _mlib_win32_once_callthru , & fn , NULL );
7373 return okay ;
7474#else
You can’t perform that action at this time.
0 commit comments