Ticket #6230: math.h.diff
File math.h.diff, 1.3 KB (added by , 14 years ago) |
---|
-
headers/posix/math.h
24 24 #define __HUGE_VAL_v 0x7ff0000000000000LL 25 25 #define __huge_val_t union { unsigned char __c[8]; long long __ll; double __d; } 26 26 #ifndef HUGE_VAL 27 # define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) 27 # ifdef __clang__ 28 # define HUGE_VAL __builtin_huge_val() 29 # else 30 # define HUGE_VAL (((__huge_val_t) { __ll: __HUGE_VAL_v }).__d) 31 # endif 28 32 #endif 29 33 30 34 #define __HUGE_VALF_v 0x7f800000L 31 35 #define __huge_valf_t union { unsigned char __c[4]; long __l; float __f; } 32 #define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 36 #ifdef __clang__ 37 # define HUGE_VALF __builtin_huge_valf() 38 #else 39 # define HUGE_VALF (((__huge_valf_t) { __l: __HUGE_VALF_v }).__f) 40 #endif 33 41 34 42 /* TODO: define HUGE_VALL for long doubles */ 35 43 36 44 #define __NAN_VALF_v 0x7fc00000L 37 #define NAN (((__huge_valf_t) { __l: __NAN_VALF_v }).__f) 45 #ifdef __clang__ 46 # define NAN __builtin_nanf("") 47 #else 48 # define NAN (((__huge_valf_t) { __l: __NAN_VALF_v }).__f) 49 #endif 38 50 39 #define INFINITY HUGE_VALF 51 #ifdef __clang__ 52 # define INFINITY __builtin_inff() 53 #else 54 # define INFINITY HUGE_VALF 55 #endif 40 56 41 57 /* floating-point categories */ 42 58 #define FP_NAN 0