I've just updated to using VS2019 and found a problem with csa/nan.h

Basically this file calls ymath.h when compiled on VS. According to this
forum post PLplot / Discussion / Open Discussion: Error compiling in
MSVC2019 (sourceforge.net)
<https://sourceforge.net/p/plplot/discussion/8606/thread/318f366398/?limit=25>
it's
due to VS mixing C and C++. I've never really heard of ymath.h, but a quick
google seems to hint that it is part of Microsoft's implementation of the
C++ Standard Template Library - so maybe it should never have been called
from C code in the first place.

The problem itself appears in plgridd.c where csa/nan.h is #included even
when we are not building with csa.

My feel is that plgridd.c should simply not use csa to get its NAN
implementation. So I'm about to commit a fix that defines PLFLT_NAN along
with PLFLT_HUGE_VAL, etc in plplot.h.

I'm posting to ask what (if anything) we should do with CSA?

>From what I understand CSA is external to PLPlot and was just pulled into
the repo some time ago. It is not code written by PLPlot devs. CSA is now
available on github at cameronbracken/csa
<https://github.com/cameronbracken/csa>, although it hasn't been updated
for around 9 years. Arjen - if you read this, it looks like it was you that
added the ymath.h code.

I've never used csa, so for now I won't change anything within the CSA
code. But I guess we can either revert to the non ymath.h code or do
something entirely different.

For now, my changes will mean when CSA is off PLPlot will still build.
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to