Add 60.ganesha to what gets installed by make install as well as by the RPM
[sahlberg/ctdb.git] / include / includes.h
index bffc66b358b597c1c9138bb70de10823337d416e..b3f8eb941b22ad6cce91a7180a3db6bf2f9e6677 100644 (file)
@@ -2,11 +2,11 @@
 
 #include "replace.h"
 #include "talloc.h"
+#include "system/wait.h"
+#include "system/network.h"
 #include "tdb.h"
 #include "idtree.h"
-#include "ctdb.h"
-#include "lib/util/dlinklist.h"
-#include "lib/util/debug.h"
+#include "ctdb_client.h"
 
 typedef bool BOOL;
 
@@ -14,10 +14,26 @@ typedef bool BOOL;
 #define False 0
 
 extern int LogLevel;
-
-#define DEBUG(lvl, x) if ((lvl) <= LogLevel) (do_debug x)
+extern int this_log_level;
+
+enum debug_level { 
+       DEBUG_EMERG   = -3, 
+       DEBUG_ALERT   = -2, 
+       DEBUG_CRIT    = -1,
+       DEBUG_ERR     =  0,
+       DEBUG_WARNING =  1,
+       DEBUG_NOTICE  =  2,     
+       DEBUG_INFO    =  3,
+       DEBUG_DEBUG   =  4,
+};
+
+#define DEBUGLVL(lvl) ((lvl) <= LogLevel)
+#define DEBUG(lvl, x) do { this_log_level = (lvl); if ((lvl) < DEBUG_DEBUG) { log_ringbuffer x; } if ((lvl) <= LogLevel) { do_debug x; }} while (0)
+#define DEBUGADD(lvl, x) do { if ((lvl) <= LogLevel) { this_log_level = (lvl); do_debug_add x; }} while (0)
 
 #define _PUBLIC_
+#define _NORETURN_
+#define _PURE_
 
 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
 
@@ -34,4 +50,11 @@ 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);
+double timeval_delta(struct timeval *tv2, struct timeval *tv);
 char **file_lines_load(const char *fname, int *numlines, TALLOC_CTX *mem_ctx);
+char *hex_encode_talloc(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);
+
+#include "lib/util/debug.h"
+#include "lib/util/util.h"