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

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

E-mail: