Skip to content
This repository has been archived by the owner on Jul 12, 2024. It is now read-only.

Commit

Permalink
fix: MSVC 1940
Browse files Browse the repository at this point in the history
  • Loading branch information
MiroKaku committed May 27, 2024
1 parent 160d047 commit 1c66666
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/crt/stl/stdhndlr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@

#include <new>

#ifndef _LOCK_MALLOC
#define _LOCK_MALLOC 1
#endif

using new_hand = int(__cdecl*)(size_t);

extern "C" new_hand __cdecl _set_new_handler(new_hand);
Expand Down
4 changes: 4 additions & 0 deletions src/crt/stl/xlock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
#endif
#include "xmtx.hpp"

#ifndef _LOCK_AT_THREAD_EXIT
#define _LOCK_AT_THREAD_EXIT 4
#endif

_STD_BEGIN

constexpr int _Max_lock = 8; // must be power of two
Expand Down
8 changes: 8 additions & 0 deletions src/ucxxrt.inl
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,14 @@
# endif
#endif

#ifndef _EXTERN_C
#define _EXTERN_C EXTERN_C_START
#endif

#ifndef _END_EXTERN_C
#define _END_EXTERN_C EXTERN_C_END
#endif

#include <stddef.h>
#include <stdlib.h>
#include <stdint.h>
Expand Down

0 comments on commit 1c66666

Please sign in to comment.