1 #define HAVE_UNIXSOCKET 1
8 #include "lib/util/debug.h"
17 #define DEBUG(lvl, x) if ((lvl) <= LogLevel) (do_debug x)
21 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
24 #define discard_const(ptr) ((void *)((intptr_t)(ptr)))
27 struct timeval timeval_zero(void);
28 bool timeval_is_zero(const struct timeval *tv);
29 struct timeval timeval_current(void);
30 struct timeval timeval_set(uint32_t secs, uint32_t usecs);
31 int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
32 struct timeval timeval_until(const struct timeval *tv1,
33 const struct timeval *tv2);
34 _PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
35 double timeval_elapsed(struct timeval *tv);
36 char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
37 char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len);
38 _PUBLIC_ const char **str_list_add(const char **list, const char *s);
39 _PUBLIC_ int set_blocking(int fd, bool set);