HAVE_BUGGY_SINCOS test is wrong
|Target version:||Candidate for next bugfix release|
First the "#" should clearly be in front of the line
Second, the result is "1" when sincos works (see the comment "/* return TRUE if sincos works ok */"
The check clearly is meant to detect a sincos function that doesn't change c or s ... this may have been the case for some implementation on sincos on some platform.
Normally, it should return "1" on FAILURE, so the we need this line instead
return (s == s1 || c == c1);} /* return TRUE if sincos fails */
#3 Updated by Paul about 4 years ago
This dates way back to when some alpha chip(?) systems had a buggy sincos. It is at least 10 years and was added by Lloyd Parkes in New Zealand. I am sure it could be removed. Lloyd has not been active with GMT for probably 5 years and has not registered with the wiki.
#5 Updated by Paul about 4 years ago
Under Ubuntu on Windows 10 the revised test says SINCOS is buggy and then our sincos replacement code is compiled. Yet, sincos exists and for unclear reasons when sincos is called we do enter into the code in gmt_notposix.c and it crashes. Not clear in ddd why it crashes. I think the fix needs to be revised. I agree with the missing hashtag in front of the include but not with the reversal of the test. I have put back the test the way it was. FYI, when I try that dummy program with sincos under WIn10 Ubuntu the results are correct. Yet, after the fix cmake says sincos is buggy.... Update in r17487.