Revision c94655b0

b/fpu/softfloat-native.h
33 33
#define isunordered(x,y)        unordered(x, y)
34 34
#endif
35 35

  
36
#if defined(__sun__) && !defined(NEED_LIBSUNMATH)
37

  
38
#ifndef isnan
39
# define isnan(x) \
40
    (sizeof (x) == sizeof (long double) ? isnan_ld (x) \
41
     : sizeof (x) == sizeof (double) ? isnan_d (x) \
42
     : isnan_f (x))
43
static inline int isnan_f  (float       x) { return x != x; }
44
static inline int isnan_d  (double      x) { return x != x; }
45
static inline int isnan_ld (long double x) { return x != x; }
46
#endif
47

  
48
#ifndef isinf
49
# define isinf(x) \
50
    (sizeof (x) == sizeof (long double) ? isinf_ld (x) \
51
     : sizeof (x) == sizeof (double) ? isinf_d (x) \
52
     : isinf_f (x))
53
static inline int isinf_f  (float       x) { return isnan (x - x); }
54
static inline int isinf_d  (double      x) { return isnan (x - x); }
55
static inline int isinf_ld (long double x) { return isnan (x - x); }
56
#endif
57
#endif
58

  
36 59
typedef float float32;
37 60
typedef double float64;
38 61
#ifdef FLOATX80

Also available in: Unified diff