summaryrefslogtreecommitdiffstats
path: root/ctdb/includes.h
blob: 2ed9fa165a24e54ef139a29f05e5ac7fa4551401 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#define HAVE_UNIXSOCKET 1

#include "replace.h"
#include "talloc.h"
#include "tdb.h"
#include "ctdb.h"
#include "dlinklist.h"

typedef bool BOOL;

#define True 1
#define False 0

#define DEBUG(lvl, x) printf x

#define _PUBLIC_

#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))

struct timeval timeval_zero(void);
bool timeval_is_zero(const struct timeval *tv);
struct timeval timeval_current(void);
struct timeval timeval_set(uint32_t secs, uint32_t usecs);
int timeval_compare(const struct timeval *tv1, const struct timeval *tv2);
struct timeval timeval_until(const struct timeval *tv1,
			     const struct timeval *tv2);
_PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs);
char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);