constants.rs 990 B

12345678910111213141516171819202122232425262728293031323334353637
  1. use platform::types::*;
  2. pub const EOF: c_int = -1;
  3. pub const BUFSIZ: c_int = 1024;
  4. pub const UNGET: c_int = 8;
  5. pub const FILENAME_MAX: c_int = 4096;
  6. pub const F_PERM: c_int = 1;
  7. pub const F_NORD: c_int = 4;
  8. pub const F_NOWR: c_int = 8;
  9. pub const F_EOF: c_int = 16;
  10. pub const F_ERR: c_int = 32;
  11. pub const F_SVB: c_int = 64;
  12. pub const F_APP: c_int = 128;
  13. pub const F_BADJ: c_int = 256;
  14. pub const SEEK_SET: c_int = 0;
  15. pub const SEEK_CUR: c_int = 1;
  16. pub const SEEK_END: c_int = 2;
  17. pub const _IOFBF: c_int = 0;
  18. pub const _IOLBF: c_int = 1;
  19. pub const _IONBF: c_int = 2;
  20. // form of name is /XXXXXX, so 7
  21. pub const L_tmpnam: c_int = 7;
  22. // 36^6 (26 letters + 10 digits) is larger than i32::MAX, so just set to that
  23. // for now
  24. pub const TMP_MAX: int32_t = 2_147_483_647;
  25. // XXX: defined manually in bits/stdio.h as well because cbindgen can't handle
  26. // string constants in any form AFAICT
  27. pub const P_tmpdir: &[u8; 5] = b"/tmp\0";
  28. #[allow(non_camel_case_types)]
  29. pub type fpos_t = off_t;