From c9f04d8648cfdd573d45d47467bc964ef01f754d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Mon, 16 Apr 2007 00:18:54 +0000 Subject: r22231: merge from bzr ctdb tree (This used to be commit 807b959082d3b9a929c9f6597714e636638a940e) --- source4/cluster/ctdb/include/includes.h | 36 +++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 source4/cluster/ctdb/include/includes.h (limited to 'source4/cluster/ctdb/include/includes.h') diff --git a/source4/cluster/ctdb/include/includes.h b/source4/cluster/ctdb/include/includes.h new file mode 100644 index 0000000000..994c25452c --- /dev/null +++ b/source4/cluster/ctdb/include/includes.h @@ -0,0 +1,36 @@ +#define HAVE_UNIXSOCKET 1 + +#include "replace.h" +#include "talloc.h" +#include "tdb.h" +#include "idtree.h" +#include "ctdb.h" +#include "lib/util/dlinklist.h" + +typedef bool BOOL; + +#define True 1 +#define False 0 + +#define LogLevel 0 + +#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (printf x) + +#define _PUBLIC_ + +#define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) + +#ifndef discard_const +#define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#endif + +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); + -- cgit From 650d81b252cc669ef848448afad7e9bb79c4f20e Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 21 Apr 2007 07:23:42 +0000 Subject: r22421: merged in latest ctdb changes from bzr (This used to be commit 3633f862b966866819c9a0a6ad0238a858e15e62) --- source4/cluster/ctdb/include/includes.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'source4/cluster/ctdb/include/includes.h') diff --git a/source4/cluster/ctdb/include/includes.h b/source4/cluster/ctdb/include/includes.h index 994c25452c..bffc66b358 100644 --- a/source4/cluster/ctdb/include/includes.h +++ b/source4/cluster/ctdb/include/includes.h @@ -6,15 +6,16 @@ #include "idtree.h" #include "ctdb.h" #include "lib/util/dlinklist.h" +#include "lib/util/debug.h" typedef bool BOOL; #define True 1 #define False 0 -#define LogLevel 0 +extern int LogLevel; -#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (printf x) +#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (do_debug x) #define _PUBLIC_ @@ -32,5 +33,5 @@ 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); +double timeval_elapsed(struct timeval *tv); char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx); - -- cgit From 6504900f1f52927adab3489b8d04b6644ceaee7d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 08:06:51 +0000 Subject: r23806: update Samba4 with the latest ctdb code. This doesn't get the ctdb code fully working in Samba4, it just gets it building and not breaking non-clustered use of Samba. It will take a bit longer to update some of the calling ctdb_cluster.c code to make it work correctly in Samba4. Note also that Samba4 now only links to the client portion of ctdb. For the moment I am leaving the ctdbd as a separate daemon, which you install separately from http://ctdb.samba.org/. (This used to be commit b196077cbb55cbecad87065133c2d67198e31066) --- source4/cluster/ctdb/include/includes.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source4/cluster/ctdb/include/includes.h') diff --git a/source4/cluster/ctdb/include/includes.h b/source4/cluster/ctdb/include/includes.h index bffc66b358..a345fa2e81 100644 --- a/source4/cluster/ctdb/include/includes.h +++ b/source4/cluster/ctdb/include/includes.h @@ -5,7 +5,6 @@ #include "tdb.h" #include "idtree.h" #include "ctdb.h" -#include "lib/util/dlinklist.h" #include "lib/util/debug.h" typedef bool BOOL; @@ -35,3 +34,7 @@ struct timeval timeval_until(const struct timeval *tv1, _PUBLIC_ struct timeval timeval_current_ofs(uint32_t secs, uint32_t usecs); double timeval_elapsed(struct timeval *tv); char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx); +char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len); +_PUBLIC_ const char **str_list_add(const char **list, const char *s); +_PUBLIC_ int set_blocking(int fd, BOOL set); + -- cgit From 61ffa08f4c95e29d301de9fbabd6e71c2dbc1056 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 27 Aug 2007 18:10:19 +0000 Subject: r24712: No longer expose the 'BOOL' data type in any interfaces. (This used to be commit 1ce32673d960c8b05b6c1b1b99e1976a402417ae) --- source4/cluster/ctdb/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/cluster/ctdb/include/includes.h') diff --git a/source4/cluster/ctdb/include/includes.h b/source4/cluster/ctdb/include/includes.h index a345fa2e81..48c3c2ea4c 100644 --- a/source4/cluster/ctdb/include/includes.h +++ b/source4/cluster/ctdb/include/includes.h @@ -36,5 +36,5 @@ double timeval_elapsed(struct timeval *tv); char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx); char *hex_encode(TALLOC_CTX *mem_ctx, const unsigned char *buff_in, size_t len); _PUBLIC_ const char **str_list_add(const char **list, const char *s); -_PUBLIC_ int set_blocking(int fd, BOOL set); +_PUBLIC_ int set_blocking(int fd, bool set); -- cgit From 107ab090e23dfc517bc74bb553315cd3528e1f7d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 17 Apr 2008 14:47:07 +0200 Subject: use uintptr_t instead of intptr_t where appropriate (This used to be commit d62f2bcc85c13605c133db250e0a86d2d6ccc481) --- source4/cluster/ctdb/include/includes.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/cluster/ctdb/include/includes.h') diff --git a/source4/cluster/ctdb/include/includes.h b/source4/cluster/ctdb/include/includes.h index 48c3c2ea4c..0ed44cbad0 100644 --- a/source4/cluster/ctdb/include/includes.h +++ b/source4/cluster/ctdb/include/includes.h @@ -21,7 +21,7 @@ extern int LogLevel; #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x)) #ifndef discard_const -#define discard_const(ptr) ((void *)((intptr_t)(ptr))) +#define discard_const(ptr) ((void *)((uintptr_t)(ptr))) #endif struct timeval timeval_zero(void); -- cgit