isinf is a function / macro which returns wether or not a float is
positive
infinite or negative infinite. I think it is a standard C function. Maybe solaris declares it in some header that needs to be included, like math.h?
I have logged for this bug: http://bugs.winehq.org/show_bug.cgi?id=12008
Not sure where to find it exactly. But isinf seems to be defined by ISO 99 (not by standard C).
Regards,
Petr
Petr Sumbera [mailto:Petr.Sumbera@Sun.COM]
isinf is a function / macro which returns wether or not a
float is positive >infinite or negative infinite. I think it is a standard C function. Maybe >solaris declares it in some header that needs to be included, like math.h?
I have logged for this bug: http://bugs.winehq.org/show_bug.cgi?id=12008
Not sure where to find it exactly. But isinf seems to be defined by ISO 99 (not by standard C).
Following link might give some details about Sun Solaris support of infinintes and also ideas how to solve that problem.
http://www.google.nl/codesearch?q=isinf&ie=UTF-8&oe=utf-8&rls=or... -US:official&client=firefox-a&um=1&sa=X&oi=codesearch_group&resnum=4&ct=titl e
Rolf Kalbermatter
Am Sonntag, 13. April 2008 22:28:16 schrieb Rolf Kalbermatter:
Following link might give some details about Sun Solaris support of infinintes and also ideas how to solve that problem.
Yes, that would work. Any build system guru who could implement that? I think it is not a good idea to put that into wined3d
Stefan Dösinger wrote:
Am Sonntag, 13. April 2008 22:28:16 schrieb Rolf Kalbermatter:
Following link might give some details about Sun Solaris support of infinintes and also ideas how to solve that problem.
Yes, that would work. Any build system guru who could implement that? I think it is not a good idea to put that into wined3d
Well, we have only one isinf call in Wine so I think it isn't worst of creating Wine special isinf implementation. Instead I propose emulate isinf via finite() and isnand() (both coming from ieeefp.h).
Petr
Petr Sumbera Petr.Sumbera@Sun.COM writes:
Well, we have only one isinf call in Wine so I think it isn't worst of creating Wine special isinf implementation. Instead I propose emulate isinf via finite() and isnand() (both coming from ieeefp.h).
You should still put that in libwine_port, it keeps the #ifdef ugliness out of the code.
Alexandre Julliard wrote:
Petr Sumbera Petr.Sumbera@Sun.COM writes:
Well, we have only one isinf call in Wine so I think it isn't worst of creating Wine special isinf implementation. Instead I propose emulate isinf via finite() and isnand() (both coming from ieeefp.h).
You should still put that in libwine_port, it keeps the #ifdef ugliness out of the code.
What about defining isinf as macro?
diff --git a/include/wine/port.h b/include/wine/port.h index 6727891..59c12aa 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -146,6 +146,11 @@ struct statvfs #define strtoull _strtoui64 #endif
+#if !defined(HAVE_ISINF) && defined(HAVE_IEEEFP_H) +#include <ieeefp.h> +#define isinf(x) (!(finite(x) || isnand(x))) +#endif + #ifndef S_ISLNK # define S_ISLNK(mod) (0) #endif
---
BTW, I would maybe question also existence of float_32_to_16() in header file too.
Petr
Petr.Sumbera@Sun.COM [mailto:Petr.Sumbera@Sun.COM] wrote:
What about defining isinf as macro?
diff --git a/include/wine/port.h b/include/wine/port.h index 6727891..59c12aa 100644 --- a/include/wine/port.h +++ b/include/wine/port.h @@ -146,6 +146,11 @@ struct statvfs #define strtoull _strtoui64 #endif
+#if !defined(HAVE_ISINF) && defined(HAVE_IEEEFP_H) #include <ieeefp.h> +#define isinf(x) (!(finite(x) || isnand(x))) #endif
- #ifndef S_ISLNK # define S_ISLNK(mod) (0) #endif
With the exception of the somewhat weird line wrapping (or better lack thereof) this looks like what I had in mind. I don't see the benefit of adding something simple like this into libwine_port.
But of course it's Alexandre's call.
Rolf Kalbermatter