diff options
author | kikht <kikht@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:14 +0300 |
commit | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libevent/log-internal.h | |
parent | 194cae0e8855b11be2005e1eff12c660c3ee9774 (diff) | |
download | ydb-778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5.tar.gz |
Restoring authorship annotation for <kikht@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libevent/log-internal.h')
-rw-r--r-- | contrib/libs/libevent/log-internal.h | 84 |
1 files changed, 42 insertions, 42 deletions
diff --git a/contrib/libs/libevent/log-internal.h b/contrib/libs/libevent/log-internal.h index d2538f5226..2c31608b25 100644 --- a/contrib/libs/libevent/log-internal.h +++ b/contrib/libs/libevent/log-internal.h @@ -24,15 +24,15 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef LOG_INTERNAL_H_INCLUDED_ -#define LOG_INTERNAL_H_INCLUDED_ +#ifndef LOG_INTERNAL_H_INCLUDED_ +#define LOG_INTERNAL_H_INCLUDED_ #include "event2/util.h" -#ifdef __cplusplus -extern "C" { -#endif - +#ifdef __cplusplus +extern "C" { +#endif + #ifdef __GNUC__ #define EV_CHECK_FMT(a,b) __attribute__((format(printf, a, b))) #define EV_NORETURN __attribute__((noreturn)) @@ -41,54 +41,54 @@ extern "C" { #define EV_NORETURN #endif -#define EVENT_ERR_ABORT_ ((int)0xdeaddead) +#define EVENT_ERR_ABORT_ ((int)0xdeaddead) -#if !defined(EVENT__DISABLE_DEBUG_MODE) || defined(USE_DEBUG) -#define EVENT_DEBUG_LOGGING_ENABLED -#endif - -#ifdef EVENT_DEBUG_LOGGING_ENABLED -EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_; -#define event_debug_get_logging_mask_() (event_debug_logging_mask_) -#else -#define event_debug_get_logging_mask_() (0) -#endif - -EVENT2_EXPORT_SYMBOL +#if !defined(EVENT__DISABLE_DEBUG_MODE) || defined(USE_DEBUG) +#define EVENT_DEBUG_LOGGING_ENABLED +#endif + +#ifdef EVENT_DEBUG_LOGGING_ENABLED +EVENT2_CORE_EXPORT_SYMBOL extern ev_uint32_t event_debug_logging_mask_; +#define event_debug_get_logging_mask_() (event_debug_logging_mask_) +#else +#define event_debug_get_logging_mask_() (0) +#endif + +EVENT2_EXPORT_SYMBOL void event_err(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN; -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_warn(const char *fmt, ...) EV_CHECK_FMT(1,2); -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_sock_err(int eval, evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(3,4) EV_NORETURN; -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_sock_warn(evutil_socket_t sock, const char *fmt, ...) EV_CHECK_FMT(2,3); -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_errx(int eval, const char *fmt, ...) EV_CHECK_FMT(2,3) EV_NORETURN; -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_warnx(const char *fmt, ...) EV_CHECK_FMT(1,2); -EVENT2_EXPORT_SYMBOL +EVENT2_EXPORT_SYMBOL void event_msgx(const char *fmt, ...) EV_CHECK_FMT(1,2); -EVENT2_EXPORT_SYMBOL -void event_debugx_(const char *fmt, ...) EV_CHECK_FMT(1,2); +EVENT2_EXPORT_SYMBOL +void event_debugx_(const char *fmt, ...) EV_CHECK_FMT(1,2); -EVENT2_EXPORT_SYMBOL -void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap) - EV_CHECK_FMT(3,0); - -#ifdef EVENT_DEBUG_LOGGING_ENABLED -#define event_debug(x) do { \ - if (event_debug_get_logging_mask_()) { \ - event_debugx_ x; \ - } \ - } while (0) +EVENT2_EXPORT_SYMBOL +void event_logv_(int severity, const char *errstr, const char *fmt, va_list ap) + EV_CHECK_FMT(3,0); + +#ifdef EVENT_DEBUG_LOGGING_ENABLED +#define event_debug(x) do { \ + if (event_debug_get_logging_mask_()) { \ + event_debugx_ x; \ + } \ + } while (0) #else -#define event_debug(x) ((void)0) +#define event_debug(x) ((void)0) #endif #undef EV_CHECK_FMT -#ifdef __cplusplus -} +#ifdef __cplusplus +} #endif - -#endif /* LOG_INTERNAL_H_INCLUDED_ */ + +#endif /* LOG_INTERNAL_H_INCLUDED_ */ |