[libxml2] Remove isinf/isnan emulation in win32config.h
- From: Nick Wellnhofer <nwellnhof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] Remove isinf/isnan emulation in win32config.h
- Date: Thu, 3 Mar 2022 23:29:00 +0000 (UTC)
commit ae3cf4831ca6295bd9c638c199fb40b50d35bd4a
Author: Nick Wellnhofer <wellnhofer aevum de>
Date: Thu Mar 3 23:57:59 2022 +0100
Remove isinf/isnan emulation in win32config.h
There's already a better fallback in xpath.c.
include/win32config.h | 57 ---------------------------------------------------
1 file changed, 57 deletions(-)
---
diff --git a/include/win32config.h b/include/win32config.h
index d804404a..41618cc1 100644
--- a/include/win32config.h
+++ b/include/win32config.h
@@ -21,63 +21,6 @@
*/
#undef except
-#define HAVE_ISINF
-#define HAVE_ISNAN
-#include <math.h>
-#if defined(_MSC_VER) || defined(__BORLANDC__)
-/* MS C-runtime has functions which can be used in order to determine if
- a given floating-point variable contains NaN, (+-)INF. These are
- preferred, because floating-point technology is considered proprietary
- by MS and we can assume that their functions know more about their
- oddities than we do. */
-#include <float.h>
-/* Bjorn Reese figured a quite nice construct for isinf() using the _fpclass
- function. */
-#ifndef isinf
-#define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
- : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
-#endif
-/* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
-#ifndef isnan
-#define isnan(d) (_isnan(d))
-#endif
-#else /* _MSC_VER */
-#ifndef isinf
-static int isinf (double d) {
- int expon = 0;
- double val = frexp (d, &expon);
- if (expon == 1025) {
- if (val == 0.5) {
- return 1;
- } else if (val == -0.5) {
- return -1;
- } else {
- return 0;
- }
- } else {
- return 0;
- }
-}
-#endif
-#ifndef isnan
-static int isnan (double d) {
- int expon = 0;
- double val = frexp (d, &expon);
- if (expon == 1025) {
- if (val == 0.5) {
- return 0;
- } else if (val == -0.5) {
- return 0;
- } else {
- return 1;
- }
- } else {
- return 0;
- }
-}
-#endif
-#endif /* _MSC_VER */
-
#if defined(_MSC_VER)
#define mkdir(p,m) _mkdir(p)
#if _MSC_VER < 1900
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]