Skip to content

Commit

Permalink
Fix build error on windows x86
Browse files Browse the repository at this point in the history
  • Loading branch information
qgymib committed Nov 9, 2024
1 parent f1a0be1 commit 55ec2c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
### Features
1. Allow to build as shared library.

### Fixed
1. Fix build error on windows x86.


## v4.0.0 (2024/04/30)

Expand Down
2 changes: 1 addition & 1 deletion include/cutest.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ extern "C" {
/**
* @brief Development version.
*/
#define CUTEST_VERSION_PREREL 1
#define CUTEST_VERSION_PREREL 2

/**
* @brief Ensure the api is exposed as C function.
Expand Down
11 changes: 8 additions & 3 deletions src/cutest.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,13 @@
*/
#if defined(_MSC_VER)
# ifndef weak_alias
# define weak_alias(name, aliasname) \
__pragma(comment(linker,"/alternatename:" #aliasname "=" #name));
# if defined(_WIN64)
# define weak_alias(name, aliasname) \
__pragma(comment(linker,"/alternatename:" #aliasname "=" #name));
# else
# define weak_alias(name, aliasname) \
__pragma(comment(linker,"/alternatename:_" #aliasname "=_" #name));
# endif
# endif
#elif defined(__GNUC__) || defined(__clang__) || defined(__ARMCOMPILER_VERSION)
# ifndef weak_alias
Expand Down Expand Up @@ -338,7 +343,7 @@ static LARGE_INTEGER _cutest_get_file_time_offset(void)
return t;
}

static BOOL _cutest_init_timestamp_win32(PINIT_ONCE InitOnce, PVOID Parameter, PVOID* Context)
static BOOL CALLBACK _cutest_init_timestamp_win32(PINIT_ONCE InitOnce, PVOID Parameter, PVOID* Context)
{
(void)InitOnce; (void)Parameter; (void)Context;

Expand Down

0 comments on commit 55ec2c6

Please sign in to comment.