#define ROUNDUP4(a) (1 + (((a) - 1) | 3))
#define ROUNDUP8(a) (1 + (((a) - 1) | 7))
-#define NSEC_PER_SEC 1000000000L
-#define MSEC_PER_SEC 1000
-#define CSEC_PER_SEC 100L
-#define NSEC_PER_CSEC 10000000L
-
/* Some systems don't define timespec macros */
#ifndef timespecclear
#define timespecclear(tsp) (tsp)->tv_sec = (time_t)((tsp)->tv_nsec = 0L)
#endif
#endif
-#ifndef MSEC_PER_SEC
-#define MSEC_PER_SEC 1000
-#define NSEC_PER_MSEC 1000000L
-#define NSEC_PER_SEC 1000000000U
-#endif
-
#if defined(HAVE_KQUEUE)
#include <sys/event.h>
#include <fcntl.h>
#include <time.h>
+/* Handy macros to create subsecond timeouts */
+#define CSEC_PER_SEC 100
+#define MSEC_PER_SEC 1000
+#define NSEC_PER_CSEC 10000000
+#define NSEC_PER_MSEC 1000000
+#define NSEC_PER_SEC 1000000000
+
/* eloop queues are really only for deleting timeouts registered
* for a function or object.
* The idea being that one interface has different timeouts for