Merge from tridge
[sahlberg/ctdb.git] / include / includes.h
1 #define HAVE_UNIXSOCKET 1
2
3 #include "replace.h"
4 #include "talloc.h"
5 #include "tdb.h"
6 #include "idtree.h"
7 #include "ctdb.h"
8 #include "lib/util/dlinklist.h"
9
10 typedef bool BOOL;
11
12 #define True 1
13 #define False 0
14
15 #define DEBUG(lvl, x) printf x
16
17 #define _PUBLIC_
18
19 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
20
21 struct timeval timeval_zero(void);
22 bool timeval_is_zero(const struct timeval *tv);
23 struct timeval timeval_current(void);
24 struct timeval timeval_set(uint32_t secs, uint32_t usecs);
25 int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
26 struct timeval timeval_until(const struct timeval *tv1,
27                              const struct timeval *tv2);
28 _PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
29 char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
30