diff options
author | thegeorg <thegeorg@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:12 +0300 |
commit | 49116032d905455a7b1c994e4a696afc885c1e71 (patch) | |
tree | be835aa92c6248212e705f25388ebafcf84bc7a1 /contrib/libs/libevent | |
parent | 4e839db24a3bbc9f1c610c43d6faaaa99824dcca (diff) | |
download | ydb-49116032d905455a7b1c994e4a696afc885c1e71.tar.gz |
Restoring authorship annotation for <thegeorg@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/libevent')
30 files changed, 375 insertions, 375 deletions
diff --git a/contrib/libs/libevent/ChangeLog b/contrib/libs/libevent/ChangeLog index 9d52d9547c..17874b14b9 100644 --- a/contrib/libs/libevent/ChangeLog +++ b/contrib/libs/libevent/ChangeLog @@ -1,84 +1,84 @@ -Changes in version 2.1.12-stable (05 Jul 2020) - - This release contains mostly bug fixes (I decided not to port some features - that can be ported even without ABI breakage, if you cannot find feature that - you are interested in, please give us a note!) - - Since 2.1.12 libevent will use github actions as main CI, since - it recommends itself better then travis/appveyor (and had been removed from - upstream). - - Look carefully at "slightly touches the behaviour" section. - - Below you will find some of changes (this list has been cleaned up from the - patches that touches only tests and similar): - - CI: - o Backport github actions to 2.1 (be3acd7c Azat Khuzhin) - o Merge branch 'event_rpcgen.py-cleanup' (f0ded5f3, 48e04887 Enji Cooper) - o Add API/ABI checker (using LVC) (709210d4, 2af1f6cc yuangongji) - - test: - o tinytest: support timeout on Windows (794e8f75 yuangongji) - o Merge branch 'osx-clock' (e85afbe3 Azat Khuzhin) - o test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive (8ad26d0b Azat Khuzhin) - - fixes: - o buffer: do not pass NULL to memcpy() from evbuffer_pullup() (5b063049 Azat Khuzhin) - o http: fix undefined-shift in EVUTIL_IS*_ helpers (6b8d02a7 Azat Khuzhin) - o Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl() (97e28f09 Azat Khuzhin) - o http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else) (1be25938 Azat Khuzhin) - o evdns: Add additional validation for values of dns options (c2972453 ayuseleznev) - o There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll (891adda9 Aleksandr-Melnikov) - o Merge branch 'EV_CLOSED-and-EV_ET-fixes' (db2efdf5 Azat Khuzhin) - o Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled (8ccd8f56 Jan Kasiak) - o increase segment refcnt only if evbuffer_add_file_segment() succeeds (30662a3c yuangongji) - o evdns: fix a crash when evdns_base with waiting requests is freed (6f8e0e97 ayuseleznev) - o event_base_once: fix potential null pointer threat (2e9ceb16 chenguolong) - o http: do not assume body for CONNECT (1b42270b Azat Khuzhin) - o evbuffer_add_file: fix freeing of segment in the error path (5f017bde Azat Khuzhin) - o Fix checking return value of the evdns_base_resolv_conf_parse() (fc51bf2c Azat Khuzhin) - o Merge branch 'fix-signal-leak' (poll/select now needs reinit) (1c9cc07b Azat Khuzhin) - - improvements: - o evutil_time: improve evutil_gettimeofday on Windows (a8219143 Nick Grifka) - o Support EV_CLOSED on linux for poll(2) (2530e7c6 Azat Khuzhin) - o Parse IPv6 scope IDs. (f602211f Philip Homburg) - o evutil_time: Implements usleep() using wait funtion on Windows (d42240d1 yuangongji) - o evutil_time: detect and use _gmtime64_s()/_gmtime64() (f4a6152c yuangongji) - - slightly touches the behaviour: - o bufferevent: allow setting priority on socket and openssl type (4dd3acdd Nicolas J. Bouliane) - o Fix EV_CLOSED detection/reporting (epoll only) (1df324d4 Azat Khuzhin) (XXX) - o Revert "Warn if forked from the event loop during event_reinit()" (71f5c0d3 Azat Khuzhin) - - samples: - o https-client: load certificates from the system cert store on Windows (e9478640 yuangongji) - - build fixes: - o Do not use sysctl.h on linux (it had been deprecated) (d2871a37 Azat Khuzhin) - o cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT (a62ec765 Paul Osborne) - o Update list of cmake files for autotools dist archive (2016f017 Azat Khuzhin) - o LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default (640f9cf6 Mario Emmenlauer) - o cmake: fix getaddrinfo checking error (dea51c2e yuangongji) - o autoconf: fix getaddrinfo checking errors on mingw (b9bf7fa7 yuangongji) - o Do not use shared global structures on CYGWIN (8a9b5655 Azat Khuzhin) - o Added uninstall target check to cmakelists (3f1fb1f9 Dimo Markov) - o Fix compilation without OPENSSL_API_COMPAT (921bdcdd Azat Khuzhin) - o cmake: improve package config file (1c047618, baec84f2 yuangongji) - o Link with iphlpapi only on windows (976f7d34 Azat Khuzhin) - o autotools: fails build when need but can not find openssl (93174bb5 yuangongji) - o Merge branch 'http-connect' (e2424229 Azat Khuzhin) - o Fix compat with NetBSD >= 10 (5febb4e1 Kamil Rytarowski) - o cmake: fix getrandom() detection (e0e5f3bd Azat Khuzhin) - o arc4random: replace sysctl() with getrandom (on linux) (66ec78fd Azat Khuzhin) - o Upgrade autoconf (after upgrading minimum required to 2.67) (45da7d9d yuangongji) - o eliminate some C4267 warnings in Windows (9e468c77 yuangongji) - o autotools: attach doxygen target into all target (5d1e8570 yuangongji) - o cmake: attach doxygen target into all target (7a85300a yuangongji) - o Change the minimum version of automake to 1.13 and autoconf to 2.67 (fdb8fb66 ygj6) - o Add Uninstall.cmake.in into dist archive (877f2355 Azat Khuzhin) - +Changes in version 2.1.12-stable (05 Jul 2020) + + This release contains mostly bug fixes (I decided not to port some features + that can be ported even without ABI breakage, if you cannot find feature that + you are interested in, please give us a note!) + + Since 2.1.12 libevent will use github actions as main CI, since + it recommends itself better then travis/appveyor (and had been removed from + upstream). + + Look carefully at "slightly touches the behaviour" section. + + Below you will find some of changes (this list has been cleaned up from the + patches that touches only tests and similar): + + CI: + o Backport github actions to 2.1 (be3acd7c Azat Khuzhin) + o Merge branch 'event_rpcgen.py-cleanup' (f0ded5f3, 48e04887 Enji Cooper) + o Add API/ABI checker (using LVC) (709210d4, 2af1f6cc yuangongji) + + test: + o tinytest: support timeout on Windows (794e8f75 yuangongji) + o Merge branch 'osx-clock' (e85afbe3 Azat Khuzhin) + o test-ratelim: calculate timers bias (for slow CPUs) to avoid false-positive (8ad26d0b Azat Khuzhin) + + fixes: + o buffer: do not pass NULL to memcpy() from evbuffer_pullup() (5b063049 Azat Khuzhin) + o http: fix undefined-shift in EVUTIL_IS*_ helpers (6b8d02a7 Azat Khuzhin) + o Check error code of evhttp_add_header_internal() in evhttp_parse_query_impl() (97e28f09 Azat Khuzhin) + o http: fix EVHTTP_CON_AUTOFREE in case of timeout (and some else) (1be25938 Azat Khuzhin) + o evdns: Add additional validation for values of dns options (c2972453 ayuseleznev) + o There is typo in GetAdaptersAddresses windows library. It should be iphlpapi.dll (891adda9 Aleksandr-Melnikov) + o Merge branch 'EV_CLOSED-and-EV_ET-fixes' (db2efdf5 Azat Khuzhin) + o Fix memory corruption in EV_CLOSURE_EVENT_FINALIZE with debug enabled (8ccd8f56 Jan Kasiak) + o increase segment refcnt only if evbuffer_add_file_segment() succeeds (30662a3c yuangongji) + o evdns: fix a crash when evdns_base with waiting requests is freed (6f8e0e97 ayuseleznev) + o event_base_once: fix potential null pointer threat (2e9ceb16 chenguolong) + o http: do not assume body for CONNECT (1b42270b Azat Khuzhin) + o evbuffer_add_file: fix freeing of segment in the error path (5f017bde Azat Khuzhin) + o Fix checking return value of the evdns_base_resolv_conf_parse() (fc51bf2c Azat Khuzhin) + o Merge branch 'fix-signal-leak' (poll/select now needs reinit) (1c9cc07b Azat Khuzhin) + + improvements: + o evutil_time: improve evutil_gettimeofday on Windows (a8219143 Nick Grifka) + o Support EV_CLOSED on linux for poll(2) (2530e7c6 Azat Khuzhin) + o Parse IPv6 scope IDs. (f602211f Philip Homburg) + o evutil_time: Implements usleep() using wait funtion on Windows (d42240d1 yuangongji) + o evutil_time: detect and use _gmtime64_s()/_gmtime64() (f4a6152c yuangongji) + + slightly touches the behaviour: + o bufferevent: allow setting priority on socket and openssl type (4dd3acdd Nicolas J. Bouliane) + o Fix EV_CLOSED detection/reporting (epoll only) (1df324d4 Azat Khuzhin) (XXX) + o Revert "Warn if forked from the event loop during event_reinit()" (71f5c0d3 Azat Khuzhin) + + samples: + o https-client: load certificates from the system cert store on Windows (e9478640 yuangongji) + + build fixes: + o Do not use sysctl.h on linux (it had been deprecated) (d2871a37 Azat Khuzhin) + o cmake: avoid problems from use of CMAKE_USE_PTHREADS_INIT (a62ec765 Paul Osborne) + o Update list of cmake files for autotools dist archive (2016f017 Azat Khuzhin) + o LibeventConfig.cmake: restore CMAKE_FIND_LIBRARY_SUFFIXES and LIBEVENT_STATIC_LINK default (640f9cf6 Mario Emmenlauer) + o cmake: fix getaddrinfo checking error (dea51c2e yuangongji) + o autoconf: fix getaddrinfo checking errors on mingw (b9bf7fa7 yuangongji) + o Do not use shared global structures on CYGWIN (8a9b5655 Azat Khuzhin) + o Added uninstall target check to cmakelists (3f1fb1f9 Dimo Markov) + o Fix compilation without OPENSSL_API_COMPAT (921bdcdd Azat Khuzhin) + o cmake: improve package config file (1c047618, baec84f2 yuangongji) + o Link with iphlpapi only on windows (976f7d34 Azat Khuzhin) + o autotools: fails build when need but can not find openssl (93174bb5 yuangongji) + o Merge branch 'http-connect' (e2424229 Azat Khuzhin) + o Fix compat with NetBSD >= 10 (5febb4e1 Kamil Rytarowski) + o cmake: fix getrandom() detection (e0e5f3bd Azat Khuzhin) + o arc4random: replace sysctl() with getrandom (on linux) (66ec78fd Azat Khuzhin) + o Upgrade autoconf (after upgrading minimum required to 2.67) (45da7d9d yuangongji) + o eliminate some C4267 warnings in Windows (9e468c77 yuangongji) + o autotools: attach doxygen target into all target (5d1e8570 yuangongji) + o cmake: attach doxygen target into all target (7a85300a yuangongji) + o Change the minimum version of automake to 1.13 and autoconf to 2.67 (fdb8fb66 ygj6) + o Add Uninstall.cmake.in into dist archive (877f2355 Azat Khuzhin) + Changes in version 2.1.11-stable (01 Aug 2019) This release contains one ABI breakage fix (that had been introduced in diff --git a/contrib/libs/libevent/README.md b/contrib/libs/libevent/README.md index dcd8107e53..1247e220f5 100644 --- a/contrib/libs/libevent/README.md +++ b/contrib/libs/libevent/README.md @@ -464,24 +464,24 @@ fixing bugs: * jeremyerb * Fabrice Fontaine * wenyg - * Aleksandr-Melnikov - * ayuseleznev - * chenguolong - * Dimo Markov - * dota17 - * fanquake - * Jan Kasiak - * Kamil Rytarowski - * Mario Emmenlauer - * Michael Davidsaver - * mohuang - * Nick Grifka - * Nicolas J. Bouliane - * Paul Osborne - * Philip Homburg - * Wataru Ashihara - * William A Rowe Jr - * yangyongsheng + * Aleksandr-Melnikov + * ayuseleznev + * chenguolong + * Dimo Markov + * dota17 + * fanquake + * Jan Kasiak + * Kamil Rytarowski + * Mario Emmenlauer + * Michael Davidsaver + * mohuang + * Nick Grifka + * Nicolas J. Bouliane + * Paul Osborne + * Philip Homburg + * Wataru Ashihara + * William A Rowe Jr + * yangyongsheng If we have forgotten your name, please contact us. diff --git a/contrib/libs/libevent/arc4random.c b/contrib/libs/libevent/arc4random.c index e6c5de6de1..8729f6b92f 100644 --- a/contrib/libs/libevent/arc4random.c +++ b/contrib/libs/libevent/arc4random.c @@ -63,10 +63,10 @@ #ifdef EVENT__HAVE_SYS_SYSCTL_H #include <sys/sysctl.h> #endif -#ifdef EVENT__HAVE_SYS_RANDOM_H -#include <sys/random.h> +#ifdef EVENT__HAVE_SYS_RANDOM_H +#include <sys/random.h> +#endif #endif -#endif #include <limits.h> #include <stdlib.h> #include <string.h> @@ -170,10 +170,10 @@ arc4_seed_win32(void) } #endif -#if defined(EVENT__HAVE_GETRANDOM) -#define TRY_SEED_GETRANDOM +#if defined(EVENT__HAVE_GETRANDOM) +#define TRY_SEED_GETRANDOM static int -arc4_seed_getrandom(void) +arc4_seed_getrandom(void) { unsigned char buf[ADD_ENTROPY]; size_t len, n; @@ -185,7 +185,7 @@ arc4_seed_getrandom(void) for (len = 0; len < sizeof(buf); len += n) { n = sizeof(buf) - len; - if (0 == getrandom(&buf[len], n, 0)) + if (0 == getrandom(&buf[len], n, 0)) return -1; } /* make sure that the buffer actually got set. */ @@ -199,9 +199,9 @@ arc4_seed_getrandom(void) evutil_memclear_(buf, sizeof(buf)); return 0; } -#endif /* EVENT__HAVE_GETRANDOM */ +#endif /* EVENT__HAVE_GETRANDOM */ -#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL) +#if defined(EVENT__HAVE_SYS_SYSCTL_H) && defined(EVENT__HAVE_SYSCTL) #if EVENT__HAVE_DECL_CTL_KERN && EVENT__HAVE_DECL_KERN_ARND #define TRY_SEED_SYSCTL_BSD static int @@ -340,10 +340,10 @@ arc4_seed(void) if (0 == arc4_seed_win32()) ok = 1; #endif -#ifdef TRY_SEED_GETRANDOM - if (0 == arc4_seed_getrandom()) - ok = 1; -#endif +#ifdef TRY_SEED_GETRANDOM + if (0 == arc4_seed_getrandom()) + ok = 1; +#endif #ifdef TRY_SEED_URANDOM if (0 == arc4_seed_urandom()) ok = 1; diff --git a/contrib/libs/libevent/buffer.c b/contrib/libs/libevent/buffer.c index 13a2c85288..3524b3504d 100644 --- a/contrib/libs/libevent/buffer.c +++ b/contrib/libs/libevent/buffer.c @@ -1421,11 +1421,11 @@ evbuffer_pullup(struct evbuffer *buf, ev_ssize_t size) for (; chain != NULL && (size_t)size >= chain->off; chain = next) { next = chain->next; - if (chain->buffer) { - memcpy(buffer, chain->buffer + chain->misalign, chain->off); - size -= chain->off; - buffer += chain->off; - } + if (chain->buffer) { + memcpy(buffer, chain->buffer + chain->misalign, chain->off); + size -= chain->off; + buffer += chain->off; + } if (chain == last_with_data) removed_last_with_data = 1; if (&chain->next == buf->last_with_datap) @@ -3274,9 +3274,9 @@ evbuffer_add_file_segment(struct evbuffer *buf, chain->off = length; } - EVLOCK_LOCK(seg->lock, 0); - ++seg->refcnt; - EVLOCK_UNLOCK(seg->lock, 0); + EVLOCK_LOCK(seg->lock, 0); + ++seg->refcnt; + EVLOCK_UNLOCK(seg->lock, 0); extra->segment = seg; buf->n_add_for_cb += length; evbuffer_chain_insert(buf, chain); diff --git a/contrib/libs/libevent/bufferevent_sock.c b/contrib/libs/libevent/bufferevent_sock.c index 6a756cfeca..003a5d3d0d 100644 --- a/contrib/libs/libevent/bufferevent_sock.c +++ b/contrib/libs/libevent/bufferevent_sock.c @@ -654,7 +654,7 @@ bufferevent_priority_set(struct bufferevent *bufev, int priority) struct bufferevent_private *bufev_p = BEV_UPCAST(bufev); BEV_LOCK(bufev); - if (BEV_IS_ASYNC(bufev) || BEV_IS_FILTER(bufev) || BEV_IS_PAIR(bufev)) + if (BEV_IS_ASYNC(bufev) || BEV_IS_FILTER(bufev) || BEV_IS_PAIR(bufev)) goto done; if (event_priority_set(&bufev->ev_read, priority) == -1) diff --git a/contrib/libs/libevent/config.h b/contrib/libs/libevent/config.h index 8220cd9540..8b87592052 100644 --- a/contrib/libs/libevent/config.h +++ b/contrib/libs/libevent/config.h @@ -13,9 +13,9 @@ /* Define to 1 if you have the `accept4' function. */ #define HAVE_ACCEPT4 1 -/* Define to 1 if you have the <afunix.h> header file. */ -/* #undef HAVE_AFUNIX_H */ - +/* Define to 1 if you have the <afunix.h> header file. */ +/* #undef HAVE_AFUNIX_H */ + /* Define to 1 if you have the `arc4random' function. */ /* #undef HAVE_ARC4RANDOM */ @@ -33,11 +33,11 @@ /* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you don't. */ -/* #undef HAVE_DECL_CTL_KERN */ +/* #undef HAVE_DECL_CTL_KERN */ /* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you don't. */ -/* #undef HAVE_DECL_KERN_ARND */ +/* #undef HAVE_DECL_KERN_ARND */ /* Define if /dev/poll is available */ /* #undef HAVE_DEVPOLL */ @@ -102,9 +102,9 @@ /* Define to 1 if you have the `getprotobynumber' function. */ #define HAVE_GETPROTOBYNUMBER 1 -/* Define to 1 if you have the `getrandom' function. */ -#define HAVE_GETRANDOM 1 - +/* Define to 1 if you have the `getrandom' function. */ +#define HAVE_GETRANDOM 1 + /* Define to 1 if you have the `getservbyname' function. */ #define HAVE_GETSERVBYNAME 1 @@ -129,18 +129,18 @@ /* Define to 1 if you have the `kqueue' function. */ /* #undef HAVE_KQUEUE */ -/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ -/* #undef HAVE_LIBWS2_32 */ - +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +/* #undef HAVE_LIBWS2_32 */ + /* Define if the system has zlib */ #define HAVE_LIBZ 1 /* Define to 1 if you have the `mach_absolute_time' function. */ /* #undef HAVE_MACH_ABSOLUTE_TIME */ -/* Define to 1 if you have the <mach/mach.h> header file. */ -/* #undef HAVE_MACH_MACH_H */ - +/* Define to 1 if you have the <mach/mach.h> header file. */ +/* #undef HAVE_MACH_MACH_H */ + /* Define to 1 if you have the <mach/mach_time.h> header file. */ /* #undef HAVE_MACH_MACH_TIME_H */ @@ -292,7 +292,7 @@ #define HAVE_STRUCT_SOCKADDR_UN 1 /* Define to 1 if you have the `sysctl' function. */ -/* #undef HAVE_SYSCTL */ +/* #undef HAVE_SYSCTL */ /* Define to 1 if you have the <sys/devpoll.h> header file. */ /* #undef HAVE_SYS_DEVPOLL_H */ @@ -318,9 +318,9 @@ /* Define to 1 if you have the <sys/queue.h> header file. */ #define HAVE_SYS_QUEUE_H 1 -/* Define to 1 if you have the <sys/random.h> header file. */ -#define HAVE_SYS_RANDOM_H 1 - +/* Define to 1 if you have the <sys/random.h> header file. */ +#define HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the <sys/resource.h> header file. */ #define HAVE_SYS_RESOURCE_H 1 @@ -337,7 +337,7 @@ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysctl.h> header file. */ -/* #undef HAVE_SYS_SYSCTL_H */ +/* #undef HAVE_SYS_SYSCTL_H */ /* Define to 1 if you have the <sys/timerfd.h> header file. */ #define HAVE_SYS_TIMERFD_H 1 @@ -411,12 +411,12 @@ /* Define to 1 if you have the <zlib.h> header file. */ #define HAVE_ZLIB_H 1 -/* Define to 1 if you have the `_gmtime64' function. */ -/* #undef HAVE__GMTIME64 */ - -/* Define to 1 if you have the `_gmtime64_s' function. */ -/* #undef HAVE__GMTIME64_S */ - +/* Define to 1 if you have the `_gmtime64' function. */ +/* #undef HAVE__GMTIME64 */ + +/* Define to 1 if you have the `_gmtime64_s' function. */ +/* #undef HAVE__GMTIME64_S */ + /* Define to 1 if compiler have __FUNCTION__ */ #define HAVE___FUNCTION__ 1 @@ -427,7 +427,7 @@ #define LT_OBJDIR ".libs/" /* Numeric representation of the version */ -#define NUMERIC_VERSION 0x02010c00 +#define NUMERIC_VERSION 0x02010c00 /* Name of package */ #define PACKAGE "libevent" @@ -439,7 +439,7 @@ #define PACKAGE_NAME "libevent" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "libevent 2.1.12-stable" +#define PACKAGE_STRING "libevent 2.1.12-stable" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libevent" @@ -448,7 +448,7 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "2.1.12-stable" +#define PACKAGE_VERSION "2.1.12-stable" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -510,7 +510,7 @@ /* Version number of package */ -#define VERSION "2.1.12-stable" +#define VERSION "2.1.12-stable" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE diff --git a/contrib/libs/libevent/epoll.c b/contrib/libs/libevent/epoll.c index 6727d30a3f..bdec2e4569 100644 --- a/contrib/libs/libevent/epoll.c +++ b/contrib/libs/libevent/epoll.c @@ -281,7 +281,7 @@ epoll_apply_one_change(struct event_base *base, return 0; } - if ((ch->read_change|ch->write_change|ch->close_change) & EV_CHANGE_ET) + if ((ch->read_change|ch->write_change|ch->close_change) & EV_CHANGE_ET) events |= EPOLLET; memset(&epev, 0, sizeof(epev)); @@ -486,10 +486,10 @@ epoll_dispatch(struct event_base *base, struct timeval *tv) continue; #endif - if (what & EPOLLERR) { + if (what & EPOLLERR) { + ev = EV_READ | EV_WRITE; + } else if ((what & EPOLLHUP) && !(what & EPOLLRDHUP)) { ev = EV_READ | EV_WRITE; - } else if ((what & EPOLLHUP) && !(what & EPOLLRDHUP)) { - ev = EV_READ | EV_WRITE; } else { if (what & EPOLLIN) ev |= EV_READ; diff --git a/contrib/libs/libevent/evdns.c b/contrib/libs/libevent/evdns.c index de73e169e2..3468721a6d 100644 --- a/contrib/libs/libevent/evdns.c +++ b/contrib/libs/libevent/evdns.c @@ -3531,7 +3531,7 @@ evdns_base_set_option_impl(struct evdns_base *base, base->global_max_retransmits = retries; } else if (str_matches_option(option, "randomize-case:")) { int randcase = strtoint(val); - if (randcase == -1) return -1; + if (randcase == -1) return -1; if (!(flags & DNS_OPTION_MISC)) return 0; base->global_randomize_case = randcase; } else if (str_matches_option(option, "bind-to:")) { @@ -3555,13 +3555,13 @@ evdns_base_set_option_impl(struct evdns_base *base, sizeof(tv)); } else if (str_matches_option(option, "so-rcvbuf:")) { int buf = strtoint(val); - if (buf == -1) return -1; + if (buf == -1) return -1; if (!(flags & DNS_OPTION_MISC)) return 0; log(EVDNS_LOG_DEBUG, "Setting SO_RCVBUF to %s", val); base->so_rcvbuf = buf; } else if (str_matches_option(option, "so-sndbuf:")) { int buf = strtoint(val); - if (buf == -1) return -1; + if (buf == -1) return -1; if (!(flags & DNS_OPTION_MISC)) return 0; log(EVDNS_LOG_DEBUG, "Setting SO_SNDBUF to %s", val); base->so_sndbuf = buf; @@ -4035,7 +4035,7 @@ evdns_base_new(struct event_base *event_base, int flags) #else r = evdns_base_resolv_conf_parse(base, opts, "/etc/resolv.conf"); #endif - if (r) { + if (r) { evdns_base_free_and_unlock(base, 0); return NULL; } @@ -4109,11 +4109,11 @@ evdns_base_free_and_unlock(struct evdns_base *base, int fail_requests) /* TODO(nickm) we might need to refcount here. */ - while (base->req_waiting_head) { - if (fail_requests) - reply_schedule_callback(base->req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL); - request_finished(base->req_waiting_head, &base->req_waiting_head, 1); - } + while (base->req_waiting_head) { + if (fail_requests) + reply_schedule_callback(base->req_waiting_head, 0, DNS_ERR_SHUTDOWN, NULL); + request_finished(base->req_waiting_head, &base->req_waiting_head, 1); + } for (i = 0; i < base->n_req_heads; ++i) { while (base->req_heads[i]) { if (fail_requests) diff --git a/contrib/libs/libevent/event-internal.h b/contrib/libs/libevent/event-internal.h index 97a5b79444..9e5ff42447 100644 --- a/contrib/libs/libevent/event-internal.h +++ b/contrib/libs/libevent/event-internal.h @@ -418,7 +418,7 @@ int event_add_nolock_(struct event *ev, * if it is running in another thread and it doesn't have EV_FINALIZE set. */ #define EVENT_DEL_AUTOBLOCK 2 -/** Argument for event_del_nolock_. Tells event_del to proceed even if the +/** Argument for event_del_nolock_. Tells event_del to proceed even if the * event is set up for finalization rather for regular use.*/ #define EVENT_DEL_EVEN_IF_FINALIZING 3 int event_del_nolock_(struct event *ev, int blocking); diff --git a/contrib/libs/libevent/event.c b/contrib/libs/libevent/event.c index cd35fcd8e3..7a42b73191 100644 --- a/contrib/libs/libevent/event.c +++ b/contrib/libs/libevent/event.c @@ -1706,7 +1706,7 @@ event_process_active_single_queue(struct event_base *base, evcb_evfinalize = ev->ev_evcallback.evcb_cb_union.evcb_evfinalize; EVUTIL_ASSERT((evcb->evcb_flags & EVLIST_FINALIZING)); EVBASE_RELEASE_LOCK(base, th_base_lock); - event_debug_note_teardown_(ev); + event_debug_note_teardown_(ev); evcb_evfinalize(ev, ev->ev_arg); if (evcb_closure == EV_CLOSURE_EVENT_FINALIZE_FREE) mm_free(ev); @@ -2056,9 +2056,9 @@ event_base_once(struct event_base *base, evutil_socket_t fd, short events, int res = 0; int activate = 0; - if (!base) - return (-1); - + if (!base) + return (-1); + /* We cannot support signals that just fire once, or persistent * events. */ if (events & (EV_SIGNAL|EV_PERSIST)) diff --git a/contrib/libs/libevent/event_core/ya.make b/contrib/libs/libevent/event_core/ya.make index 537baac84f..3988de817a 100644 --- a/contrib/libs/libevent/event_core/ya.make +++ b/contrib/libs/libevent/event_core/ya.make @@ -3,7 +3,7 @@ LIBRARY() WITHOUT_LICENSE_TEXTS() - + OWNER( dldmitry efmv diff --git a/contrib/libs/libevent/event_extra/ya.make b/contrib/libs/libevent/event_extra/ya.make index a8f56f657e..9f4c289e62 100644 --- a/contrib/libs/libevent/event_extra/ya.make +++ b/contrib/libs/libevent/event_extra/ya.make @@ -3,7 +3,7 @@ LIBRARY() WITHOUT_LICENSE_TEXTS() - + OWNER( dldmitry efmv diff --git a/contrib/libs/libevent/event_openssl/ya.make b/contrib/libs/libevent/event_openssl/ya.make index be6746f129..fe042893c0 100644 --- a/contrib/libs/libevent/event_openssl/ya.make +++ b/contrib/libs/libevent/event_openssl/ya.make @@ -3,7 +3,7 @@ LIBRARY() WITHOUT_LICENSE_TEXTS() - + OWNER( dldmitry efmv diff --git a/contrib/libs/libevent/event_thread/ya.make b/contrib/libs/libevent/event_thread/ya.make index ae173403ca..63579b456a 100644 --- a/contrib/libs/libevent/event_thread/ya.make +++ b/contrib/libs/libevent/event_thread/ya.make @@ -3,7 +3,7 @@ LIBRARY() WITHOUT_LICENSE_TEXTS() - + OWNER( dldmitry efmv diff --git a/contrib/libs/libevent/evmap.c b/contrib/libs/libevent/evmap.c index 4630b7a442..e4e35c6877 100644 --- a/contrib/libs/libevent/evmap.c +++ b/contrib/libs/libevent/evmap.c @@ -432,7 +432,7 @@ evmap_io_active_(struct event_base *base, evutil_socket_t fd, short events) if (NULL == ctx) return; LIST_FOREACH(ev, &ctx->events, ev_io_next) { - if (ev->ev_events & (events & ~EV_ET)) + if (ev->ev_events & (events & ~EV_ET)) event_active_nolock_(ev, ev->ev_events & events, 1); } } diff --git a/contrib/libs/libevent/evthread-internal.h b/contrib/libs/libevent/evthread-internal.h index 47c1cbb42c..83e409f09b 100644 --- a/contrib/libs/libevent/evthread-internal.h +++ b/contrib/libs/libevent/evthread-internal.h @@ -38,7 +38,7 @@ extern "C" { struct event_base; -#if !defined(_WIN32) && !defined(__CYGWIN__) +#if !defined(_WIN32) && !defined(__CYGWIN__) /* On Windows, the way we currently make DLLs, it's not allowed for us to * have shared global structures. Thus, we only do the direct-call-to-function * code path if we know that the local shared library system supports it. diff --git a/contrib/libs/libevent/evutil.c b/contrib/libs/libevent/evutil.c index d9393e4675..9976e79beb 100644 --- a/contrib/libs/libevent/evutil.c +++ b/contrib/libs/libevent/evutil.c @@ -41,7 +41,7 @@ /* For structs needed by GetAdaptersAddresses */ #define _WIN32_WINNT 0x0501 #include <iphlpapi.h> -#include <netioapi.h> +#include <netioapi.h> #endif #include <sys/types.h> @@ -75,9 +75,9 @@ #endif #include <time.h> #include <sys/stat.h> -#ifndef _WIN32 -#include <net/if.h> -#endif +#ifndef _WIN32 +#include <net/if.h> +#endif #ifdef EVENT__HAVE_IFADDRS_H #include <ifaddrs.h> #endif @@ -698,7 +698,7 @@ evutil_check_ifaddrs(void) "GetAdaptersInfo", but that's deprecated; let's just try GetAdaptersAddresses and fall back to connect+getsockname. */ - HMODULE lib = evutil_load_windows_system_library_(TEXT("iphlpapi.dll")); + HMODULE lib = evutil_load_windows_system_library_(TEXT("iphlpapi.dll")); GetAdaptersAddresses_fn_t fn; ULONG size, res; IP_ADAPTER_ADDRESSES *addresses = NULL, *address; @@ -994,7 +994,7 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname, struct evutil_addrinfo *hints, struct evutil_addrinfo **res, int *portnum) { int port = 0; - unsigned int if_index; + unsigned int if_index; const char *pname; if (nodename == NULL && servname == NULL) @@ -1068,12 +1068,12 @@ evutil_getaddrinfo_common_(const char *nodename, const char *servname, if (hints->ai_family == PF_INET6 || hints->ai_family == PF_UNSPEC) { struct sockaddr_in6 sin6; memset(&sin6, 0, sizeof(sin6)); - if (1 == evutil_inet_pton_scope( - AF_INET6, nodename, &sin6.sin6_addr, &if_index)) { + if (1 == evutil_inet_pton_scope( + AF_INET6, nodename, &sin6.sin6_addr, &if_index)) { /* Got an ipv6 address. */ sin6.sin6_family = AF_INET6; sin6.sin6_port = htons(port); - sin6.sin6_scope_id = if_index; + sin6.sin6_scope_id = if_index; *res = evutil_new_addrinfo_((struct sockaddr*)&sin6, sizeof(sin6), hints); if (!*res) @@ -1992,41 +1992,41 @@ evutil_inet_ntop(int af, const void *src, char *dst, size_t len) } int -evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp) -{ - int r; - unsigned if_index; - char *check, *cp, *tmp_src; - - *indexp = 0; /* Reasonable default */ - - /* Bail out if not IPv6 */ - if (af != AF_INET6) - return evutil_inet_pton(af, src, dst); - - cp = strchr(src, '%'); - - /* Bail out if no zone ID */ - if (cp == NULL) - return evutil_inet_pton(af, src, dst); - - if_index = if_nametoindex(cp + 1); - if (if_index == 0) { - /* Could be numeric */ - if_index = strtoul(cp + 1, &check, 10); - if (check[0] != '\0') - return 0; - } - *indexp = if_index; - tmp_src = mm_strdup(src); - cp = strchr(tmp_src, '%'); - *cp = '\0'; - r = evutil_inet_pton(af, tmp_src, dst); - free(tmp_src); - return r; -} - -int +evutil_inet_pton_scope(int af, const char *src, void *dst, unsigned *indexp) +{ + int r; + unsigned if_index; + char *check, *cp, *tmp_src; + + *indexp = 0; /* Reasonable default */ + + /* Bail out if not IPv6 */ + if (af != AF_INET6) + return evutil_inet_pton(af, src, dst); + + cp = strchr(src, '%'); + + /* Bail out if no zone ID */ + if (cp == NULL) + return evutil_inet_pton(af, src, dst); + + if_index = if_nametoindex(cp + 1); + if (if_index == 0) { + /* Could be numeric */ + if_index = strtoul(cp + 1, &check, 10); + if (check[0] != '\0') + return 0; + } + *indexp = if_index; + tmp_src = mm_strdup(src); + cp = strchr(tmp_src, '%'); + *cp = '\0'; + r = evutil_inet_pton(af, tmp_src, dst); + free(tmp_src); + return r; +} + +int evutil_inet_pton(int af, const char *src, void *dst) { #if defined(EVENT__HAVE_INET_PTON) && !defined(USE_INTERNAL_PTON) @@ -2142,7 +2142,7 @@ int evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int *outlen) { int port; - unsigned int if_index; + unsigned int if_index; char buf[128]; const char *cp, *addr_part, *port_part; int is_ipv6; @@ -2212,13 +2212,13 @@ evutil_parse_sockaddr_port(const char *ip_as_string, struct sockaddr *out, int * #endif sin6.sin6_family = AF_INET6; sin6.sin6_port = htons(port); - if (1 != evutil_inet_pton_scope( - AF_INET6, addr_part, &sin6.sin6_addr, &if_index)) { + if (1 != evutil_inet_pton_scope( + AF_INET6, addr_part, &sin6.sin6_addr, &if_index)) { return -1; - } + } if ((int)sizeof(sin6) > *outlen) return -1; - sin6.sin6_scope_id = if_index; + sin6.sin6_scope_id = if_index; memset(out, 0, *outlen); memcpy(out, &sin6, sizeof(sin6)); *outlen = sizeof(sin6); @@ -2372,7 +2372,7 @@ static const unsigned char EVUTIL_TOLOWER_TABLE[256] = { #define IMPL_CTYPE_FN(name) \ int EVUTIL_##name##_(char c) { \ ev_uint8_t u = c; \ - return !!(EVUTIL_##name##_TABLE[(u >> 5) & 7] & (1U << (u & 31))); \ + return !!(EVUTIL_##name##_TABLE[(u >> 5) & 7] & (1U << (u & 31))); \ } IMPL_CTYPE_FN(ISALPHA) IMPL_CTYPE_FN(ISALNUM) diff --git a/contrib/libs/libevent/evutil_time.c b/contrib/libs/libevent/evutil_time.c index 798d5fe7eb..c327218227 100644 --- a/contrib/libs/libevent/evutil_time.c +++ b/contrib/libs/libevent/evutil_time.c @@ -65,9 +65,9 @@ #ifndef EVENT__HAVE_GETTIMEOFDAY /* No gettimeofday; this must be windows. */ - -typedef void (WINAPI *GetSystemTimePreciseAsFileTime_fn_t) (LPFILETIME); - + +typedef void (WINAPI *GetSystemTimePreciseAsFileTime_fn_t) (LPFILETIME); + int evutil_gettimeofday(struct timeval *tv, struct timezone *tz) { @@ -93,23 +93,23 @@ evutil_gettimeofday(struct timeval *tv, struct timezone *tz) if (tv == NULL) return -1; - static GetSystemTimePreciseAsFileTime_fn_t GetSystemTimePreciseAsFileTime_fn = NULL; - static int check_precise = 1; - - if (EVUTIL_UNLIKELY(check_precise)) { - HMODULE h = evutil_load_windows_system_library_(TEXT("kernel32.dll")); - if (h != NULL) - GetSystemTimePreciseAsFileTime_fn = - (GetSystemTimePreciseAsFileTime_fn_t) - GetProcAddress(h, "GetSystemTimePreciseAsFileTime"); - check_precise = 0; - } - - if (GetSystemTimePreciseAsFileTime_fn != NULL) - GetSystemTimePreciseAsFileTime_fn(&ft.ft_ft); - else - GetSystemTimeAsFileTime(&ft.ft_ft); - + static GetSystemTimePreciseAsFileTime_fn_t GetSystemTimePreciseAsFileTime_fn = NULL; + static int check_precise = 1; + + if (EVUTIL_UNLIKELY(check_precise)) { + HMODULE h = evutil_load_windows_system_library_(TEXT("kernel32.dll")); + if (h != NULL) + GetSystemTimePreciseAsFileTime_fn = + (GetSystemTimePreciseAsFileTime_fn_t) + GetProcAddress(h, "GetSystemTimePreciseAsFileTime"); + check_precise = 0; + } + + if (GetSystemTimePreciseAsFileTime_fn != NULL) + GetSystemTimePreciseAsFileTime_fn(&ft.ft_ft); + else + GetSystemTimeAsFileTime(&ft.ft_ft); + if (EVUTIL_UNLIKELY(ft.ft_64 < EPOCH_BIAS)) { /* Time before the unix epoch. */ return -1; @@ -144,22 +144,22 @@ evutil_usleep_(const struct timeval *tv) return; #if defined(_WIN32) { - __int64 usec; - LARGE_INTEGER li; - HANDLE timer; - - usec = tv->tv_sec * 1000000LL + tv->tv_usec; - if (!usec) - return; - - li.QuadPart = -10LL * usec; - timer = CreateWaitableTimer(NULL, TRUE, NULL); - if (!timer) - return; - - SetWaitableTimer(timer, &li, 0, NULL, NULL, 0); - WaitForSingleObject(timer, INFINITE); - CloseHandle(timer); + __int64 usec; + LARGE_INTEGER li; + HANDLE timer; + + usec = tv->tv_sec * 1000000LL + tv->tv_usec; + if (!usec) + return; + + li.QuadPart = -10LL * usec; + timer = CreateWaitableTimer(NULL, TRUE, NULL); + if (!timer) + return; + + SetWaitableTimer(timer, &li, 0, NULL, NULL, 0); + WaitForSingleObject(timer, INFINITE); + CloseHandle(timer); } #elif defined(EVENT__HAVE_NANOSLEEP) { @@ -190,28 +190,28 @@ evutil_date_rfc1123(char *date, const size_t datelen, const struct tm *tm) time_t t = time(NULL); -#if defined(EVENT__HAVE__GMTIME64_S) || !defined(_WIN32) +#if defined(EVENT__HAVE__GMTIME64_S) || !defined(_WIN32) struct tm sys; #endif /* If `tm` is null, set system's current time. */ if (tm == NULL) { -#if !defined(_WIN32) +#if !defined(_WIN32) gmtime_r(&t, &sys); tm = &sys; - /** detect _gmtime64()/_gmtime64_s() */ -#elif defined(EVENT__HAVE__GMTIME64_S) - errno_t err; - err = _gmtime64_s(&sys, &t); - if (err) { - event_errx(1, "Invalid argument to _gmtime64_s"); - } else { - tm = &sys; - } -#elif defined(EVENT__HAVE__GMTIME64) - tm = _gmtime64(&t); -#else - tm = gmtime(&t); + /** detect _gmtime64()/_gmtime64_s() */ +#elif defined(EVENT__HAVE__GMTIME64_S) + errno_t err; + err = _gmtime64_s(&sys, &t); + if (err) { + event_errx(1, "Invalid argument to _gmtime64_s"); + } else { + tm = &sys; + } +#elif defined(EVENT__HAVE__GMTIME64) + tm = _gmtime64(&t); +#else + tm = gmtime(&t); #endif } diff --git a/contrib/libs/libevent/http.c b/contrib/libs/libevent/http.c index 0d6efef415..b750d491c9 100644 --- a/contrib/libs/libevent/http.c +++ b/contrib/libs/libevent/http.c @@ -177,7 +177,7 @@ fake_getnameinfo(const struct sockaddr *sa, size_t salen, char *host, extern int debug; -static evutil_socket_t create_bind_socket_nonblock(struct evutil_addrinfo *, int reuse); +static evutil_socket_t create_bind_socket_nonblock(struct evutil_addrinfo *, int reuse); static evutil_socket_t bind_socket(const char *, ev_uint16_t, int reuse); static void name_from_addr(struct sockaddr *, ev_socklen_t, char **, char **); static struct evhttp_uri *evhttp_uri_parse_authority(char *source_uri); @@ -361,7 +361,7 @@ evhttp_response_needs_body(struct evhttp_request *req) return (req->response_code != HTTP_NOCONTENT && req->response_code != HTTP_NOTMODIFIED && (req->response_code < 100 || req->response_code >= 200) && - req->type != EVHTTP_REQ_CONNECT && + req->type != EVHTTP_REQ_CONNECT && req->type != EVHTTP_REQ_HEAD); } @@ -482,9 +482,9 @@ evhttp_is_connection_close(int flags, struct evkeyvalq* headers) static int evhttp_is_request_connection_close(struct evhttp_request *req) { - if (req->type == EVHTTP_REQ_CONNECT) - return 0; - + if (req->type == EVHTTP_REQ_CONNECT) + return 0; + return evhttp_is_connection_close(req->flags, req->input_headers) || evhttp_is_connection_close(req->flags, req->output_headers); @@ -785,11 +785,11 @@ evhttp_connection_fail_(struct evhttp_connection *evcon, /* We are trying the next request that was queued on us */ if (TAILQ_FIRST(&evcon->requests) != NULL) evhttp_connection_connect_(evcon); - else - if ((evcon->flags & EVHTTP_CON_OUTGOING) && - (evcon->flags & EVHTTP_CON_AUTOFREE)) { - evhttp_connection_free(evcon); - } + else + if ((evcon->flags & EVHTTP_CON_OUTGOING) && + (evcon->flags & EVHTTP_CON_AUTOFREE)) { + evhttp_connection_free(evcon); + } /* The call to evhttp_connection_reset_ overwrote errno. * Let's restore the original errno, so that the user's @@ -3344,7 +3344,7 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers, p = argument = line; while (p != NULL && *p != '\0') { char *key, *value, *decoded_value; - int err; + int err; argument = strsep(&p, "&"); value = argument; @@ -3360,10 +3360,10 @@ evhttp_parse_query_impl(const char *str, struct evkeyvalq *headers, evhttp_decode_uri_internal(value, strlen(value), decoded_value, 1 /*always_decode_plus*/); event_debug(("Query Param: %s -> %s\n", key, decoded_value)); - err = evhttp_add_header_internal(headers, key, decoded_value); + err = evhttp_add_header_internal(headers, key, decoded_value); mm_free(decoded_value); - if (err) - goto error; + if (err) + goto error; } result = 0; @@ -4467,7 +4467,7 @@ name_from_addr(struct sockaddr *sa, ev_socklen_t salen, /* Create a non-blocking socket and bind it */ static evutil_socket_t -create_bind_socket_nonblock(struct evutil_addrinfo *ai, int reuse) +create_bind_socket_nonblock(struct evutil_addrinfo *ai, int reuse) { evutil_socket_t fd; @@ -4570,14 +4570,14 @@ bind_socket(const char *address, ev_uint16_t port, int reuse) /* just create an unbound socket */ if (address == NULL && port == 0) - return create_bind_socket_nonblock(NULL, 0); + return create_bind_socket_nonblock(NULL, 0); aitop = make_addrinfo(address, port); if (aitop == NULL) return (-1); - fd = create_bind_socket_nonblock(aitop, reuse); + fd = create_bind_socket_nonblock(aitop, reuse); evutil_freeaddrinfo(aitop); diff --git a/contrib/libs/libevent/include/event2/buffer.h b/contrib/libs/libevent/include/event2/buffer.h index ca67451fa5..88af3ae141 100644 --- a/contrib/libs/libevent/include/event2/buffer.h +++ b/contrib/libs/libevent/include/event2/buffer.h @@ -726,8 +726,8 @@ int evbuffer_write_atmost(struct evbuffer *buffer, evutil_socket_t fd, @param buffer the evbuffer to store the result @param fd the file descriptor to read from - @param howmuch the number of bytes to be read. If the given number is negative - or out of maximum bytes per one read, as many bytes as we can will be read. + @param howmuch the number of bytes to be read. If the given number is negative + or out of maximum bytes per one read, as many bytes as we can will be read. @return the number of bytes read, or -1 if an error occurred @see evbuffer_write() */ diff --git a/contrib/libs/libevent/include/event2/event-config-linux.h b/contrib/libs/libevent/include/event2/event-config-linux.h index b8c0faafde..f8fbfe5c8b 100644 --- a/contrib/libs/libevent/include/event2/event-config-linux.h +++ b/contrib/libs/libevent/include/event2/event-config-linux.h @@ -26,9 +26,9 @@ /* Define to 1 if you have the `accept4' function. */ #define EVENT__HAVE_ACCEPT4 1 -/* Define to 1 if you have the <afunix.h> header file. */ -/* #undef EVENT__HAVE_AFUNIX_H */ - +/* Define to 1 if you have the <afunix.h> header file. */ +/* #undef EVENT__HAVE_AFUNIX_H */ + /* Define to 1 if you have the `arc4random' function. */ /* #undef EVENT__HAVE_ARC4RANDOM */ @@ -46,11 +46,11 @@ /* Define to 1 if you have the declaration of `CTL_KERN', and to 0 if you don't. */ -/* #undef EVENT__HAVE_DECL_CTL_KERN */ +/* #undef EVENT__HAVE_DECL_CTL_KERN */ /* Define to 1 if you have the declaration of `KERN_ARND', and to 0 if you don't. */ -/* #undef EVENT__HAVE_DECL_KERN_ARND */ +/* #undef EVENT__HAVE_DECL_KERN_ARND */ /* Define if /dev/poll is available */ /* #undef EVENT__HAVE_DEVPOLL */ @@ -115,9 +115,9 @@ /* Define to 1 if you have the `getprotobynumber' function. */ #define EVENT__HAVE_GETPROTOBYNUMBER 1 -/* Define to 1 if you have the `getrandom' function. */ -#define EVENT__HAVE_GETRANDOM 1 - +/* Define to 1 if you have the `getrandom' function. */ +#define EVENT__HAVE_GETRANDOM 1 + /* Define to 1 if you have the `getservbyname' function. */ #define EVENT__HAVE_GETSERVBYNAME 1 @@ -142,18 +142,18 @@ /* Define to 1 if you have the `kqueue' function. */ /* #undef EVENT__HAVE_KQUEUE */ -/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ -/* #undef EVENT__HAVE_LIBWS2_32 */ - +/* Define to 1 if you have the `ws2_32' library (-lws2_32). */ +/* #undef EVENT__HAVE_LIBWS2_32 */ + /* Define if the system has zlib */ #define EVENT__HAVE_LIBZ 1 /* Define to 1 if you have the `mach_absolute_time' function. */ /* #undef EVENT__HAVE_MACH_ABSOLUTE_TIME */ -/* Define to 1 if you have the <mach/mach.h> header file. */ -/* #undef EVENT__HAVE_MACH_MACH_H */ - +/* Define to 1 if you have the <mach/mach.h> header file. */ +/* #undef EVENT__HAVE_MACH_MACH_H */ + /* Define to 1 if you have the <mach/mach_time.h> header file. */ /* #undef EVENT__HAVE_MACH_MACH_TIME_H */ @@ -305,7 +305,7 @@ #define EVENT__HAVE_STRUCT_SOCKADDR_UN 1 /* Define to 1 if you have the `sysctl' function. */ -/* #undef EVENT__HAVE_SYSCTL */ +/* #undef EVENT__HAVE_SYSCTL */ /* Define to 1 if you have the <sys/devpoll.h> header file. */ /* #undef EVENT__HAVE_SYS_DEVPOLL_H */ @@ -331,9 +331,9 @@ /* Define to 1 if you have the <sys/queue.h> header file. */ #define EVENT__HAVE_SYS_QUEUE_H 1 -/* Define to 1 if you have the <sys/random.h> header file. */ -#define EVENT__HAVE_SYS_RANDOM_H 1 - +/* Define to 1 if you have the <sys/random.h> header file. */ +#define EVENT__HAVE_SYS_RANDOM_H 1 + /* Define to 1 if you have the <sys/resource.h> header file. */ #define EVENT__HAVE_SYS_RESOURCE_H 1 @@ -350,7 +350,7 @@ #define EVENT__HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/sysctl.h> header file. */ -/* #undef EVENT__HAVE_SYS_SYSCTL_H */ +/* #undef EVENT__HAVE_SYS_SYSCTL_H */ /* Define to 1 if you have the <sys/timerfd.h> header file. */ #define EVENT__HAVE_SYS_TIMERFD_H 1 @@ -424,12 +424,12 @@ /* Define to 1 if you have the <zlib.h> header file. */ #define EVENT__HAVE_ZLIB_H 1 -/* Define to 1 if you have the `_gmtime64' function. */ -/* #undef EVENT__HAVE__GMTIME64 */ - -/* Define to 1 if you have the `_gmtime64_s' function. */ -/* #undef EVENT__HAVE__GMTIME64_S */ - +/* Define to 1 if you have the `_gmtime64' function. */ +/* #undef EVENT__HAVE__GMTIME64 */ + +/* Define to 1 if you have the `_gmtime64_s' function. */ +/* #undef EVENT__HAVE__GMTIME64_S */ + /* Define to 1 if compiler have __FUNCTION__ */ #define EVENT__HAVE___FUNCTION__ 1 @@ -440,7 +440,7 @@ #define EVENT__LT_OBJDIR ".libs/" /* Numeric representation of the version */ -#define EVENT__NUMERIC_VERSION 0x02010c00 +#define EVENT__NUMERIC_VERSION 0x02010c00 /* Name of package */ #define EVENT__PACKAGE "libevent" @@ -452,7 +452,7 @@ #define EVENT__PACKAGE_NAME "libevent" /* Define to the full name and version of this package. */ -#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" +#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" /* Define to the one symbol short name of this package. */ #define EVENT__PACKAGE_TARNAME "libevent" @@ -461,7 +461,7 @@ #define EVENT__PACKAGE_URL "" /* Define to the version of this package. */ -#define EVENT__PACKAGE_VERSION "2.1.12-stable" +#define EVENT__PACKAGE_VERSION "2.1.12-stable" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -523,7 +523,7 @@ /* Version number of package */ -#define EVENT__VERSION "2.1.12-stable" +#define EVENT__VERSION "2.1.12-stable" /* Enable large inode numbers on Mac OS X 10.5. */ #ifndef _DARWIN_USE_64_BIT_INODE diff --git a/contrib/libs/libevent/include/event2/event-config-osx.h b/contrib/libs/libevent/include/event2/event-config-osx.h index 23aabd6272..8e6c4f7ea0 100644 --- a/contrib/libs/libevent/include/event2/event-config-osx.h +++ b/contrib/libs/libevent/include/event2/event-config-osx.h @@ -366,7 +366,7 @@ #define EVENT__LT_OBJDIR ".libs/" /* Numeric representation of the version */ -#define EVENT__NUMERIC_VERSION 0x02010c00 +#define EVENT__NUMERIC_VERSION 0x02010c00 /* Name of package */ #define EVENT__PACKAGE "libevent" @@ -378,7 +378,7 @@ #define EVENT__PACKAGE_NAME "" /* Define to the full name and version of this package. */ -#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" +#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" /* Define to the one symbol short name of this package. */ #define EVENT__PACKAGE_TARNAME "" @@ -387,7 +387,7 @@ #define EVENT__PACKAGE_URL "" /* Define to the version of this package. */ -#define EVENT__PACKAGE_VERSION "2.1.12-stable" +#define EVENT__PACKAGE_VERSION "2.1.12-stable" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -424,7 +424,7 @@ #define EVENT__TIME_WITH_SYS_TIME 1 /* Version number of package */ -#define EVENT__VERSION "2.1.12-stable" +#define EVENT__VERSION "2.1.12-stable" /* Define to appropriate substitue if compiler doesnt have __func__ */ /* #undef EVENT____func__ */ diff --git a/contrib/libs/libevent/include/event2/event-config-win.h b/contrib/libs/libevent/include/event2/event-config-win.h index 942fd98931..ef4141a720 100644 --- a/contrib/libs/libevent/include/event2/event-config-win.h +++ b/contrib/libs/libevent/include/event2/event-config-win.h @@ -277,7 +277,7 @@ /* #undef EVENT__HAVE_WORKING_KQUEUE */ /* Numeric representation of the version */ -#define EVENT__NUMERIC_VERSION 0x02010c00 +#define EVENT__NUMERIC_VERSION 0x02010c00 /* Name of package */ #define EVENT__PACKAGE "libevent" @@ -289,13 +289,13 @@ #define EVENT__PACKAGE_NAME "" /* Define to the full name and version of this package. */ -#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" +#define EVENT__PACKAGE_STRING "libevent 2.1.12-stable" /* Define to the one symbol short name of this package. */ #define EVENT__PACKAGE_TARNAME "" /* Define to the version of this package. */ -#define EVENT__PACKAGE_VERSION "2.1.12-stable" +#define EVENT__PACKAGE_VERSION "2.1.12-stable" /* Define to necessary symbol if this constant uses a non-standard name on your system. */ @@ -334,7 +334,7 @@ #define EVENT__TIME_WITH_SYS_TIME 1 /* Version number of package */ -#define EVENT__VERSION "2.1.12-stable" +#define EVENT__VERSION "2.1.12-stable" /* Define to appropriate substitue if compiler doesnt have __func__ */ #define EVENT____func__ __FUNCTION__ diff --git a/contrib/libs/libevent/include/event2/event-config.h b/contrib/libs/libevent/include/event2/event-config.h index 9cdeecc84b..8a6043c9ba 100644 --- a/contrib/libs/libevent/include/event2/event-config.h +++ b/contrib/libs/libevent/include/event2/event-config.h @@ -1,13 +1,13 @@ #pragma once #if defined(__APPLE__) -# include "event-config-osx.h" -#elif defined(_MSC_VER) -# include "event-config-win.h" -#else -# include "event-config-linux.h" +# include "event-config-osx.h" +#elif defined(_MSC_VER) +# include "event-config-win.h" +#else +# include "event-config-linux.h" #endif #if defined(_musl_) -# include "event-config-musl.h" +# include "event-config-musl.h" #endif diff --git a/contrib/libs/libevent/include/event2/util.h b/contrib/libs/libevent/include/event2/util.h index 4614825f6e..02aa7ba9da 100644 --- a/contrib/libs/libevent/include/event2/util.h +++ b/contrib/libs/libevent/include/event2/util.h @@ -612,12 +612,12 @@ int evutil_vsnprintf(char *buf, size_t buflen, const char *format, va_list ap) /** Replacement for inet_ntop for platforms which lack it. */ EVENT2_EXPORT_SYMBOL const char *evutil_inet_ntop(int af, const void *src, char *dst, size_t len); -/** Variation of inet_pton that also parses IPv6 scopes. Public for - unit tests. No reason to call this directly. - */ -EVENT2_EXPORT_SYMBOL -int evutil_inet_pton_scope(int af, const char *src, void *dst, - unsigned *indexp); +/** Variation of inet_pton that also parses IPv6 scopes. Public for + unit tests. No reason to call this directly. + */ +EVENT2_EXPORT_SYMBOL +int evutil_inet_pton_scope(int af, const char *src, void *dst, + unsigned *indexp); /** Replacement for inet_pton for platforms which lack it. */ EVENT2_EXPORT_SYMBOL int evutil_inet_pton(int af, const char *src, void *dst); diff --git a/contrib/libs/libevent/kqueue.c b/contrib/libs/libevent/kqueue.c index b2b9d5e910..dfd7751d64 100644 --- a/contrib/libs/libevent/kqueue.c +++ b/contrib/libs/libevent/kqueue.c @@ -51,10 +51,10 @@ /* Some platforms apparently define the udata field of struct kevent as * intptr_t, whereas others define it as void*. There doesn't seem to be an * easy way to tell them apart via autoconf, so we need to use OS macros. */ -#if defined(__NetBSD__) -#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x)) -#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x)) -#elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) +#if defined(__NetBSD__) +#define PTR_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(x)) +#define INT_TO_UDATA(x) ((typeof(((struct kevent *)0)->udata))(intptr_t)(x)) +#elif defined(EVENT__HAVE_INTTYPES_H) && !defined(__OpenBSD__) && !defined(__FreeBSD__) && !defined(__darwin__) && !defined(__APPLE__) && !defined(__CloudABI__) #define PTR_TO_UDATA(x) ((intptr_t)(x)) #define INT_TO_UDATA(x) ((intptr_t)(x)) #else diff --git a/contrib/libs/libevent/openssl-compat.h b/contrib/libs/libevent/openssl-compat.h index 3a436c61b5..a23e34251b 100644 --- a/contrib/libs/libevent/openssl-compat.h +++ b/contrib/libs/libevent/openssl-compat.h @@ -34,9 +34,9 @@ static inline BIO_METHOD *BIO_meth_new(int type, const char *name) #define TLS_method SSLv23_method -#define X509_getm_notBefore X509_get_notBefore -#define X509_getm_notAfter X509_get_notAfter - +#define X509_getm_notBefore X509_get_notBefore +#define X509_getm_notAfter X509_get_notAfter + #endif /* (OPENSSL_VERSION_NUMBER < 0x10100000L) || \ (defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x20700000L) */ diff --git a/contrib/libs/libevent/poll.c b/contrib/libs/libevent/poll.c index 67f96695f4..c3c9aac52a 100644 --- a/contrib/libs/libevent/poll.c +++ b/contrib/libs/libevent/poll.c @@ -53,17 +53,17 @@ #include "evthread-internal.h" #include "time-internal.h" -/* Since Linux 2.6.17, poll is able to report about peer half-closed connection - using special POLLRDHUP flag on a read event. -*/ -#if !defined(POLLRDHUP) -#define POLLRDHUP 0 -#define EARLY_CLOSE_IF_HAVE_RDHUP 0 -#else -#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE -#endif - - +/* Since Linux 2.6.17, poll is able to report about peer half-closed connection + using special POLLRDHUP flag on a read event. +*/ +#if !defined(POLLRDHUP) +#define POLLRDHUP 0 +#define EARLY_CLOSE_IF_HAVE_RDHUP 0 +#else +#define EARLY_CLOSE_IF_HAVE_RDHUP EV_FEATURE_EARLY_CLOSE +#endif + + struct pollidx { int idxplus1; }; @@ -90,8 +90,8 @@ const struct eventop pollops = { poll_del, poll_dispatch, poll_dealloc, - 1, /* need_reinit */ - EV_FEATURE_FDS|EARLY_CLOSE_IF_HAVE_RDHUP, + 1, /* need_reinit */ + EV_FEATURE_FDS|EARLY_CLOSE_IF_HAVE_RDHUP, sizeof(struct pollidx), }; @@ -215,8 +215,8 @@ poll_dispatch(struct event_base *base, struct timeval *tv) res |= EV_READ; if (what & POLLOUT) res |= EV_WRITE; - if (what & POLLRDHUP) - res |= EV_CLOSED; + if (what & POLLRDHUP) + res |= EV_CLOSED; if (res == 0) continue; @@ -235,7 +235,7 @@ poll_add(struct event_base *base, int fd, short old, short events, void *idx_) int i; EVUTIL_ASSERT((events & EV_SIGNAL) == 0); - if (!(events & (EV_READ|EV_WRITE|EV_CLOSED))) + if (!(events & (EV_READ|EV_WRITE|EV_CLOSED))) return (0); poll_check_ok(pop); @@ -278,8 +278,8 @@ poll_add(struct event_base *base, int fd, short old, short events, void *idx_) pfd->events |= POLLOUT; if (events & EV_READ) pfd->events |= POLLIN; - if (events & EV_CLOSED) - pfd->events |= POLLRDHUP; + if (events & EV_CLOSED) + pfd->events |= POLLRDHUP; poll_check_ok(pop); return (0); @@ -298,7 +298,7 @@ poll_del(struct event_base *base, int fd, short old, short events, void *idx_) int i; EVUTIL_ASSERT((events & EV_SIGNAL) == 0); - if (!(events & (EV_READ|EV_WRITE|EV_CLOSED))) + if (!(events & (EV_READ|EV_WRITE|EV_CLOSED))) return (0); poll_check_ok(pop); @@ -312,8 +312,8 @@ poll_del(struct event_base *base, int fd, short old, short events, void *idx_) pfd->events &= ~POLLIN; if (events & EV_WRITE) pfd->events &= ~POLLOUT; - if (events & EV_CLOSED) - pfd->events &= ~POLLRDHUP; + if (events & EV_CLOSED) + pfd->events &= ~POLLRDHUP; poll_check_ok(pop); if (pfd->events) /* Another event cares about that fd. */ diff --git a/contrib/libs/libevent/select.c b/contrib/libs/libevent/select.c index 967570f212..b1db0e44b6 100644 --- a/contrib/libs/libevent/select.c +++ b/contrib/libs/libevent/select.c @@ -98,7 +98,7 @@ const struct eventop selectops = { select_del, select_dispatch, select_dealloc, - 1, /* need_reinit. */ + 1, /* need_reinit. */ EV_FEATURE_FDS, 0, }; diff --git a/contrib/libs/libevent/ya.make b/contrib/libs/libevent/ya.make index 5fd91efa3a..acfe9868c6 100644 --- a/contrib/libs/libevent/ya.make +++ b/contrib/libs/libevent/ya.make @@ -1,4 +1,4 @@ -# Generated by devtools/yamaker from nixpkgs d78cb9fc184bc9f4e3d046ed0175734950fd0342. +# Generated by devtools/yamaker from nixpkgs d78cb9fc184bc9f4e3d046ed0175734950fd0342. LIBRARY() @@ -9,7 +9,7 @@ OWNER( g:cpp-contrib ) -VERSION(2.1.12) +VERSION(2.1.12) ORIGINAL_SOURCE(https://github.com/libevent/libevent/releases/download/release-2.1.12-stable/libevent-2.1.12-stable.tar.gz) @@ -19,7 +19,7 @@ LICENSE( ISC AND MIT ) - + LICENSE_TEXTS(.yandex_meta/licenses.list.txt) PEERDIR( |