]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tevent: Move definition of _DEPRECATED_ to the top of tevent.h
authorPavel Filipenský <pfilipensky@samba.org>
Fri, 28 Apr 2023 18:13:29 +0000 (20:13 +0200)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 19 Jul 2023 08:02:33 +0000 (08:02 +0000)
Signed-off-by: Pavel Filipenský <pfilipensky@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
lib/tevent/tevent.h

index ba564bc0195ec7fcdb1f1795ae2cbfe822212e3e..59df0d467360c2ab97ab5b187203a04a5527a988 100644 (file)
 #define __has_attribute(x) 0
 #endif
 
+#ifdef TEVENT_DEPRECATED
+#ifndef _DEPRECATED_
+#if __has_attribute(deprecated) || (__GNUC__ >= 3)
+#define _DEPRECATED_ __attribute__ ((deprecated))
+#else
+#define _DEPRECATED_
+#endif
+#endif
+#endif
 
 struct tevent_context;
 struct tevent_ops;
@@ -2523,13 +2532,6 @@ void _tevent_threaded_schedule_immediate(struct tevent_threaded_context *tctx,
 #endif
 
 #ifdef TEVENT_DEPRECATED
-#ifndef _DEPRECATED_
-#if __has_attribute(deprecated) || (__GNUC__ >= 3)
-#define _DEPRECATED_ __attribute__ ((deprecated))
-#else
-#define _DEPRECATED_
-#endif
-#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,