Skip to content

Commit

Permalink
Merge pull request #53 from thexai/fix-build
Browse files Browse the repository at this point in the history
Fix build with Visual Studio 2019/2022
  • Loading branch information
thexai authored Apr 30, 2022
2 parents 6a58dc9 + 5cb1d1e commit bb3aac9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/vis_milkdrop/ns-eel2/nseel-compiler.c
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ static EEL_F onepointfive=1.5f;
static EEL_F g_closefact = NSEEL_CLOSEFACTOR;
static const EEL_F eel_zero=0.0, eel_one=1.0;

#if defined(_MSC_VER) && _MSC_VER >= 1400
#if defined(_MSC_VER) && _MSC_VER >= 1920
static double intrin_floor(double a) { return __floor(a); }
static double intrin_ceil(double a) { return __ceil(a); }
#elif defined(_MSC_VER) && _MSC_VER >= 1400
static double __floor(double a) { return floor(a); }
static double __ceil(double a) { return ceil(a); }
#endif
Expand Down Expand Up @@ -574,7 +577,10 @@ static functionType fnTable1[] = {
#endif
{ "rand", nseel_asm_1pp,nseel_asm_1pp_end, 1, {&nseel_int_rand}, } ,

#if defined(_MSC_VER) && _MSC_VER >= 1400
#if defined(_MSC_VER) && _MSC_VER >= 1920
{ "floor", nseel_asm_1pdd,nseel_asm_1pdd_end, 1, {&intrin_floor} },
{ "ceil", nseel_asm_1pdd,nseel_asm_1pdd_end, 1, {&intrin_ceil} },
#elif defined(_MSC_VER) && _MSC_VER >= 1400
{ "floor", nseel_asm_1pdd,nseel_asm_1pdd_end, 1, {&__floor} },
{ "ceil", nseel_asm_1pdd,nseel_asm_1pdd_end, 1, {&__ceil} },
#else
Expand Down

0 comments on commit bb3aac9

Please sign in to comment.