A clone of btpd with my configuration changes.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

80 lignes
2.3 KiB

  1. /* Define if kqueue works correctly with pipes */
  2. #undef HAVE_WORKING_KQUEUE
  3. /* Define to `unsigned long long' if <sys/types.h> doesn't define. */
  4. #undef u_int64_t
  5. /* Define to `unsigned int' if <sys/types.h> doesn't define. */
  6. #undef u_int32_t
  7. /* Define to `unsigned short' if <sys/types.h> doesn't define. */
  8. #undef u_int16_t
  9. /* Define to `unsigned char' if <sys/types.h> doesn't define. */
  10. #undef u_int8_t
  11. /* Define if timeradd is defined in <sys/time.h> */
  12. #undef HAVE_TIMERADD
  13. #ifndef HAVE_TIMERADD
  14. #undef timersub
  15. #define timeradd(tvp, uvp, vvp) \
  16. do { \
  17. (vvp)->tv_sec = (tvp)->tv_sec + (uvp)->tv_sec; \
  18. (vvp)->tv_usec = (tvp)->tv_usec + (uvp)->tv_usec; \
  19. if ((vvp)->tv_usec >= 1000000) { \
  20. (vvp)->tv_sec++; \
  21. (vvp)->tv_usec -= 1000000; \
  22. } \
  23. } while (0)
  24. #define timersub(tvp, uvp, vvp) \
  25. do { \
  26. (vvp)->tv_sec = (tvp)->tv_sec - (uvp)->tv_sec; \
  27. (vvp)->tv_usec = (tvp)->tv_usec - (uvp)->tv_usec; \
  28. if ((vvp)->tv_usec < 0) { \
  29. (vvp)->tv_sec--; \
  30. (vvp)->tv_usec += 1000000; \
  31. } \
  32. } while (0)
  33. #endif /* !HAVE_TIMERADD */
  34. #undef HAVE_TIMERCLEAR
  35. #ifndef HAVE_TIMERCLEAR
  36. #define timerclear(tvp) (tvp)->tv_sec = (tvp)->tv_usec = 0
  37. #endif
  38. #undef HAVE_TIMERCMP
  39. #ifndef HAVE_TIMERCMP
  40. #undef timercmp
  41. #define timercmp(tvp, uvp, cmp) \
  42. (((tvp)->tv_sec == (uvp)->tv_sec) ? \
  43. ((tvp)->tv_usec cmp (uvp)->tv_usec) : \
  44. ((tvp)->tv_sec cmp (uvp)->tv_sec))
  45. #endif
  46. #undef HAVE_TIMERISSET
  47. #ifndef HAVE_TIMERISSET
  48. #undef timerisset
  49. #define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec)
  50. #endif
  51. /* Define if TAILQ_FOREACH is defined in <sys/queue.h> */
  52. #undef HAVE_TAILQFOREACH
  53. #ifndef HAVE_TAILQFOREACH
  54. #define TAILQ_FIRST(head) ((head)->tqh_first)
  55. #define TAILQ_END(head) NULL
  56. #define TAILQ_NEXT(elm, field) ((elm)->field.tqe_next)
  57. #define TAILQ_FOREACH(var, head, field) \
  58. for((var) = TAILQ_FIRST(head); \
  59. (var) != TAILQ_END(head); \
  60. (var) = TAILQ_NEXT(var, field))
  61. #define TAILQ_INSERT_BEFORE(listelm, elm, field) do { \
  62. (elm)->field.tqe_prev = (listelm)->field.tqe_prev; \
  63. (elm)->field.tqe_next = (listelm); \
  64. *(listelm)->field.tqe_prev = (elm); \
  65. (listelm)->field.tqe_prev = &(elm)->field.tqe_next; \
  66. } while (0)
  67. #endif /* TAILQ_FOREACH */
  68. /* Define to __FUNCTION__ or __file__ if your compiler doesn't have __func__ */
  69. #undef __func__