mod.rs 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //! fenv.h implementation for Redox, following
  2. //! http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/fenv.h.html
  3. use platform::types::*;
  4. pub const FE_ALL_EXCEPT: c_int = 0;
  5. pub const FE_TONEAREST: c_int = 0;
  6. pub type fexcept_t = u64;
  7. #[repr(C)]
  8. pub struct fenv_t {
  9. pub cw: u64,
  10. }
  11. // #[no_mangle]
  12. pub unsafe extern "C" fn feclearexcept(excepts: c_int) -> c_int {
  13. unimplemented!();
  14. }
  15. // #[no_mangle]
  16. pub unsafe extern "C" fn fegenenv(envp: *mut fenv_t) -> c_int {
  17. unimplemented!();
  18. }
  19. // #[no_mangle]
  20. pub unsafe extern "C" fn fegetexceptflag(flagp: *mut fexcept_t, excepts: c_int) -> c_int {
  21. unimplemented!();
  22. }
  23. #[no_mangle]
  24. pub unsafe extern "C" fn fegetround() -> c_int {
  25. FE_TONEAREST
  26. }
  27. // #[no_mangle]
  28. pub unsafe extern "C" fn feholdexcept(envp: *mut fenv_t) -> c_int {
  29. unimplemented!();
  30. }
  31. // #[no_mangle]
  32. pub unsafe extern "C" fn feraiseexcept(except: c_int) -> c_int {
  33. unimplemented!();
  34. }
  35. // #[no_mangle]
  36. pub unsafe extern "C" fn fesetenv(envp: *const fenv_t) -> c_int {
  37. unimplemented!();
  38. }
  39. // #[no_mangle]
  40. pub unsafe extern "C" fn fesetexceptflag(flagp: *const fexcept_t, excepts: c_int) -> c_int {
  41. unimplemented!();
  42. }
  43. // #[no_mangle]
  44. pub unsafe extern "C" fn fesetround(round: c_int) -> c_int {
  45. unimplemented!();
  46. }
  47. // #[no_mangle]
  48. pub unsafe extern "C" fn fetestexcept(excepts: c_int) -> c_int {
  49. unimplemented!();
  50. }
  51. // #[no_mangle]
  52. pub unsafe extern "C" fn feupdateenv(envp: *const fenv_t) -> c_int {
  53. unimplemented!();
  54. }