Forum OpenACS Q&A: Re: ]project-open[ V5.0 Release Candidate and OpenACS

Dear Andrew,
thank you for your reply.

Indeed Ns_TimeToMilliseconds did not disappear, my fault, it just moved from nsd/tcltime.c to nsthread/time.c.

About the other complain, this piece of code:
#if defined(_MSC_VER)
static double round(double val) { return floor(val + 0.5); }
#include <math.h>
as it is does not compile with MS VSC++ 2019 (here below the compilation error).
naviserver-si\nsd\tcltime.c(47,33): error C2491: 'round': definition of dllimport function not allowed

And this is your comment:
* math.h is only needed for round()
* But the older MS Windows compiler I am using does not include round() in
* its math.h! For now use this hack. TODO: Add a check for newer math.h?

To "fix it" I had to either comment out
static double round(double val) { return floor(val + 0.5); }
or to include the math.h as it was before.
I hope I have explained the problem better.

Posted by Andrew Piskorski on
Maurizio, thanks for the bug report. I fixed it. Those two fixes are simple, so Gustaf will likely merge them in as soon as he gets a chance.

I'll also see if I can improve the Windows nmake-based build system a bit, so people other than me can use it more easily.