1 #include <fenv.h> 2 #include <features.h> 3 4 /* __fesetround wrapper for arch independent argument check */ 5 6 hidden int __fesetround(int); 7 fesetround(int r)8int fesetround(int r) 9 { 10 if (r != FE_TONEAREST 11 #ifdef FE_DOWNWARD 12 && r != FE_DOWNWARD 13 #endif 14 #ifdef FE_UPWARD 15 && r != FE_UPWARD 16 #endif 17 #ifdef FE_TOWARDZERO 18 && r != FE_TOWARDZERO 19 #endif 20 ) 21 return -1; 22 return __fesetround(r); 23 } 24