A clone of btpd with my configuration changes.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
465 B

  1. #ifndef BTPD_SUBR_H
  2. #define BTPD_SUBR_H
  3. #define min(x, y) ((x) <= (y) ? (x) : (y))
  4. int set_nonblocking(int fd);
  5. int set_blocking(int fd);
  6. int mkdirs(char *path);
  7. int vopen(int *resfd, int flags, const char *fmt, ...);
  8. void set_bit(uint8_t *bits, unsigned long index);
  9. int has_bit(uint8_t *bits, unsigned long index);
  10. void clear_bit(uint8_t *bits, unsigned long index);
  11. int canon_path(const char *path, char **res);
  12. size_t round_to_page(size_t size);
  13. #endif