Annotation of win32/gnome/libxslt-x.x.x/libxslt/win32config.h, revision 1.1

1.1     ! paf         1: #ifndef __LIBXSLT_WIN32_CONFIG__
        !             2: #define __LIBXSLT_WIN32_CONFIG__
        !             3: 
        !             4: #define HAVE_CTYPE_H
        !             5: #define HAVE_STDLIB_H
        !             6: #define HAVE_MALLOC_H
        !             7: #define HAVE_TIME_H
        !             8: #define HAVE_FCNTL_H
        !             9: 
        !            10: #include <io.h>
        !            11: 
        !            12: #define HAVE_ISINF
        !            13: #define HAVE_ISNAN
        !            14: 
        !            15: #include <math.h>
        !            16: #ifdef _MSC_VER
        !            17: /* MS C-runtime has functions which can be used in order to determine if
        !            18:    a given floating-point variable contains NaN, (+-)INF. These are 
        !            19:    preferred, because floating-point technology is considered propriatary
        !            20:    by MS and we can assume that their functions know more about their 
        !            21:    oddities than we do. */
        !            22: #include <float.h>
        !            23: /* Bjorn Reese figured a quite nice construct for isinf() using the 
        !            24:    _fpclass() function. */
        !            25: #ifndef isinf
        !            26: #define isinf(d) ((_fpclass(d) == _FPCLASS_PINF) ? 1 \
        !            27:        : ((_fpclass(d) == _FPCLASS_NINF) ? -1 : 0))
        !            28: #endif
        !            29: /* _isnan(x) returns nonzero if (x == NaN) and zero otherwise. */
        !            30: #ifndef isnan
        !            31: #define isnan(d) (_isnan(d))
        !            32: #endif
        !            33: #else /* _MSC_VER */
        !            34: static int isinf (double d) {
        !            35:     int expon = 0;
        !            36:     double val = frexp (d, &expon);
        !            37:     if (expon == 1025) {
        !            38:         if (val == 0.5) {
        !            39:             return 1;
        !            40:         } else if (val == -0.5) {
        !            41:             return -1;
        !            42:         } else {
        !            43:             return 0;
        !            44:         }
        !            45:     } else {
        !            46:         return 0;
        !            47:     }
        !            48: }
        !            49: static int isnan (double d) {
        !            50:     int expon = 0;
        !            51:     double val = frexp (d, &expon);
        !            52:     if (expon == 1025) {
        !            53:         if (val == 0.5) {
        !            54:             return 0;
        !            55:         } else if (val == -0.5) {
        !            56:             return 0;
        !            57:         } else {
        !            58:             return 1;
        !            59:         }
        !            60:     } else {
        !            61:         return 0;
        !            62:     }
        !            63: }
        !            64: #endif /* _MSC_VER */
        !            65: 
        !            66: #include <direct.h>
        !            67: 
        !            68: #define HAVE_SYS_STAT_H
        !            69: #define HAVE__STAT
        !            70: 
        !            71: #include <libxml/xmlwin32version.h>
        !            72: 
        !            73: #if !defined LIBXSLT_PUBLIC
        !            74: #if defined _MSC_VER && !defined IN_LIBXSLT && !defined LIBXSLT_STATIC
        !            75: #define LIBXSLT_PUBLIC __declspec(dllimport)
        !            76: #else
        !            77: #define LIBXSLT_PUBLIC 
        !            78: #endif
        !            79: #endif
        !            80: 
        !            81: #ifndef ATTRIBUTE_UNUSED
        !            82: #define ATTRIBUTE_UNUSED
        !            83: #endif
        !            84: 
        !            85: #endif /* __LIBXSLT_WIN32_CONFIG__ */
        !            86: 

E-mail: