includes: Move special tevent defines from tevent.h to includes.h
authorAmitay Isaacs <amitay@gmail.com>
Fri, 13 Apr 2012 06:46:38 +0000 (16:46 +1000)
committerAmitay Isaacs <amitay@gmail.com>
Fri, 13 Apr 2012 07:28:14 +0000 (17:28 +1000)
This allows to build against system tevent library. Also include tevent header
along with other common headers.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
include/includes.h
lib/tevent/tevent.h

index b7d1e76eb851226f327dd2c36b3faf83f79a0677..b5655335af585920c6b87d0db5e3c61fc5ab2019 100644 (file)
 #include "idtree.h"
 #include "ctdb_client.h"
 
+/* Allow use of deprecated function tevent_loop_allow_nesting() */
+#define TEVENT_DEPRECATED
+/* Saves ctdb from massive churn. */
+#define TEVENT_COMPAT_DEFINES 1
+
+#include "tevent.h"
+
 typedef bool BOOL;
 
 #define True 1
index 914548fd6efc14ab8b47e918b9e1a6c3dbc05c50..2a826153ebf4e478590166de1ea633225e3d3d99 100644 (file)
 #ifndef __TEVENT_H__
 #define __TEVENT_H__
 
-#ifndef TEVENT_DEPRECATED
-#define TEVENT_DEPRECATED
-#endif
-
 #include <stdint.h>
 #include <talloc.h>
 #include <sys/time.h>
@@ -1264,7 +1260,6 @@ typedef int (*tevent_nesting_hook)(struct tevent_context *ev,
                                   void *stack_ptr,
                                   const char *location);
 #ifdef TEVENT_DEPRECATED
-#if (TEVENT_DEPRECATED_QUIET != 1)
 #ifndef _DEPRECATED_
 #if (__GNUC__ >= 3) && (__GNUC_MINOR__ >= 1 )
 #define _DEPRECATED_ __attribute__ ((deprecated))
@@ -1272,10 +1267,6 @@ typedef int (*tevent_nesting_hook)(struct tevent_context *ev,
 #define _DEPRECATED_
 #endif
 #endif
-#else
-#undef _DEPRECATED_
-#define _DEPRECATED_
-#endif
 void tevent_loop_allow_nesting(struct tevent_context *ev) _DEPRECATED_;
 void tevent_loop_set_nesting_hook(struct tevent_context *ev,
                                  tevent_nesting_hook hook,
@@ -1367,8 +1358,6 @@ bool tevent_register_backend(const char *name, const struct tevent_ops *ops);
  * @{
  */
 
-/* Saves ctdb from massive churn. */
-#define TEVENT_COMPAT_DEFINES 1
 #ifdef TEVENT_COMPAT_DEFINES
 
 #define event_context  tevent_context