Hi,

in the plplot-general forum, a issue regarding the isnan() function on
AIX was reported. So far we could solve the issue (see the attached
message) in CBS, but I didn't commit anything and also some changes
elsewhere in the plplot code (where isnan is used) might be necessary.
Could somebody take over, since I'm away the next 7 days. If not I'll do
that after next week.

Thanks,
Werner

-- 
Dr. Werner Smekal
Institut fuer Allgemeine Physik
Technische Universitaet Wien
Wiedner Hauptstr 8-10
A-1040 Wien
Austria

email: sme...@iap.tuwien.ac.at
web:   http://www.iap.tuwien.ac.at/~smekal
phone: +43-(0)1-58801-13463 (office)
       +43-(0)1-58801-13469 (laboratory)
fax:   +43-(0)1-58801-13499
--- Begin Message ---
Read and respond to this message at: 
https://sourceforge.net/forum/message.php?msg_id=6301077
By: joachim_geiger

Hi Werner,
if I compile TestNaNAware.c in cmake/modules using xlc I get:
"TestNaNAware.c", line 3.10: 1506-296 (S) #include file "nan.h" not found.
"TestNaNAware.c", line 9.15: 1506-045 (S) Undeclared identifier NaN.

With a little help I recognized that the definition for NaN is in math.h, but
as NAN. The code now reads as:
/* Test for NaN awareness. */
#include <stdio.h>
#if defined(_AIX)
#include <math.h>
#elif
#include "nan.h"
#endif

int
main()
{
#if defined(_AIX)
   double x = NAN;
#elif
   double x = NaN;
#endif
   /* N.B. CMake run-time tests need return of true (1) or false (0) not
    * the usual status code of 0 for success. */
#if defined(_MSC_VER) | defined(__BORLANDC__) | defined(_AIX)
   if (isnan(x)) return 1;
#endif

   if (x != x) return 1;
   else return 0;
}

Now it compiles with xlc, but when loading I get:
ld: 0711-317 ERROR: Undefined symbol: ._isnan
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
Finally also solved the loader problem by linking with libm.a .
However, the check for isnan at the beginning is still there, since this is
done with the cmake function check_function_exists which is called in 
plplot.cmake
.
I hope you can come up with a solution using my results.
Best regards,
Joachim

______________________________________________________________________
You are receiving this email because you elected to monitor this forum.
To stop monitoring this forum, login to SourceForge.net and visit: 
https://sourceforge.net/forum/unmonitor.php?forum_id=132889

--- End Message ---
------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Plplot-devel mailing list
Plplot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-devel

Reply via email to