Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(593)

Unified Diff: third_party/libevent/chromium.patch

Issue 1531573008: move libevent into base (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix shim path Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libevent/buffer.c ('k') | third_party/libevent/compat/sys/_libevent_time.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libevent/chromium.patch
diff --git a/third_party/libevent/chromium.patch b/third_party/libevent/chromium.patch
deleted file mode 100644
index f6e00e84fa3e692812b31683f2cde1cd85de68f2..0000000000000000000000000000000000000000
--- a/third_party/libevent/chromium.patch
+++ /dev/null
@@ -1,200 +0,0 @@
-diff --git a/third_party/libevent/buffer.c b/third_party/libevent/buffer.c
-index 64324bb..ebf35c9 100644
---- a/third_party/libevent/buffer.c
-+++ b/third_party/libevent/buffer.c
-@@ -356,7 +356,6 @@ int
- evbuffer_expand(struct evbuffer *buf, size_t datlen)
- {
- size_t used = buf->misalign + buf->off;
-- size_t need;
-
- assert(buf->totallen >= used);
-
-diff --git a/third_party/libevent/evdns.c b/third_party/libevent/evdns.c
-index fa23163..f1c70d0 100644
---- a/third_party/libevent/evdns.c
-+++ b/third_party/libevent/evdns.c
-@@ -55,7 +55,9 @@
- #endif
-
- /* #define _POSIX_C_SOURCE 200507 */
-+#ifndef _GNU_SOURCE
- #define _GNU_SOURCE
-+#endif
-
- #ifdef DNS_USE_CPU_CLOCK_FOR_ID
- #ifdef DNS_USE_OPENSSL_FOR_ID
-@@ -134,7 +136,7 @@
- typedef ev_uint8_t u_char;
- typedef unsigned int uint;
- #endif
--#include <event.h>
-+#include "event.h"
-
- #define u64 ev_uint64_t
- #define u32 ev_uint32_t
-diff --git a/third_party/libevent/evdns.h b/third_party/libevent/evdns.h
-index 1eb5c38..fca4ac3 100644
---- a/third_party/libevent/evdns.h
-+++ b/third_party/libevent/evdns.h
-@@ -165,7 +165,7 @@ extern "C" {
- #endif
-
- /* For integer types. */
--#include <evutil.h>
-+#include "evutil.h"
-
- /** Error codes 0-5 are as described in RFC 1035. */
- #define DNS_ERR_NONE 0
-diff --git a/third_party/libevent/event.c b/third_party/libevent/event.c
-index da6cd42..36b1c51 100644
---- a/third_party/libevent/event.c
-+++ b/third_party/libevent/event.c
-@@ -107,7 +107,7 @@ static const struct eventop *eventops[] = {
- /* Global state */
- struct event_base *current_base = NULL;
- extern struct event_base *evsignal_base;
--static int use_monotonic;
-+static int use_monotonic = 1;
-
- /* Handle signals - This is a deprecated interface */
- int (*event_sigcb)(void); /* Signal callback when gotsig is set */
-@@ -124,17 +124,6 @@ static int timeout_next(struct event_base *, struct timeval **);
- static void timeout_process(struct event_base *);
- static void timeout_correct(struct event_base *, struct timeval *);
-
--static void
--detect_monotonic(void)
--{
--#if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
-- struct timespec ts;
--
-- if (clock_gettime(CLOCK_MONOTONIC, &ts) == 0)
-- use_monotonic = 1;
--#endif
--}
--
- static int
- gettime(struct event_base *base, struct timeval *tp)
- {
-@@ -144,18 +133,18 @@ gettime(struct event_base *base, struct timeval *tp)
- }
-
- #if defined(HAVE_CLOCK_GETTIME) && defined(CLOCK_MONOTONIC)
-- if (use_monotonic) {
-- struct timespec ts;
--
-- if (clock_gettime(CLOCK_MONOTONIC, &ts) == -1)
-- return (-1);
-+ struct timespec ts;
-
-+ if (use_monotonic &&
-+ clock_gettime(CLOCK_MONOTONIC, &ts) == 0) {
- tp->tv_sec = ts.tv_sec;
- tp->tv_usec = ts.tv_nsec / 1000;
- return (0);
- }
- #endif
-
-+ use_monotonic = 0;
-+
- return (evutil_gettimeofday(tp, NULL));
- }
-
-@@ -182,7 +171,6 @@ event_base_new(void)
- event_sigcb = NULL;
- event_gotsig = 0;
-
-- detect_monotonic();
- gettime(base, &base->event_tv);
-
- min_heap_ctor(&base->timeheap);
-@@ -398,12 +386,9 @@ event_process_active(struct event_base *base)
- ncalls--;
- ev->ev_ncalls = ncalls;
- (*ev->ev_callback)((int)ev->ev_fd, ev->ev_res, ev->ev_arg);
-- if (event_gotsig || base->event_break) {
-- ev->ev_pncalls = NULL;
-+ if (event_gotsig || base->event_break)
- return;
-- }
- }
-- ev->ev_pncalls = NULL;
- }
- }
-
-@@ -808,8 +793,6 @@ int
- event_del(struct event *ev)
- {
- struct event_base *base;
-- const struct eventop *evsel;
-- void *evbase;
-
- event_debug(("event_del: %p, callback %p",
- ev, ev->ev_callback));
-@@ -819,8 +802,6 @@ event_del(struct event *ev)
- return (-1);
-
- base = ev->ev_base;
-- evsel = base->evsel;
-- evbase = base->evbase;
-
- assert(!(ev->ev_flags & ~EVLIST_ALL));
-
-@@ -838,7 +819,7 @@ event_del(struct event *ev)
-
- if (ev->ev_flags & EVLIST_INSERTED) {
- event_queue_remove(base, ev, EVLIST_INSERTED);
-- return (evsel->del(evbase, ev));
-+ return (base->evsel->del(base->evbase, ev));
- }
-
- return (0);
-diff --git a/third_party/libevent/event.h b/third_party/libevent/event.h
-index d1f5d9e..f0887b9 100644
---- a/third_party/libevent/event.h
-+++ b/third_party/libevent/event.h
-@@ -159,7 +159,7 @@
- extern "C" {
- #endif
-
--#include <event-config.h>
-+#include "event-config.h"
- #ifdef _EVENT_HAVE_SYS_TYPES_H
- #include <sys/types.h>
- #endif
-@@ -172,7 +172,7 @@ extern "C" {
- #include <stdarg.h>
-
- /* For int types. */
--#include <evutil.h>
-+#include "evutil.h"
-
- #ifdef WIN32
- #define WIN32_LEAN_AND_MEAN
-diff --git a/third_party/libevent/evhttp.h b/third_party/libevent/evhttp.h
-index cba8be1..48c1d91 100644
---- a/third_party/libevent/evhttp.h
-+++ b/third_party/libevent/evhttp.h
-@@ -27,7 +27,7 @@
- #ifndef _EVHTTP_H_
- #define _EVHTTP_H_
-
--#include <event.h>
-+#include "event.h"
-
- #ifdef __cplusplus
- extern "C" {
-diff --git a/third_party/libevent/evutil.h b/third_party/libevent/evutil.h
-index dcb0013..8b664b9 100644
---- a/third_party/libevent/evutil.h
-+++ b/third_party/libevent/evutil.h
-@@ -38,7 +38,7 @@
- extern "C" {
- #endif
-
--#include <event-config.h>
-+#include "event-config.h"
- #ifdef _EVENT_HAVE_SYS_TIME_H
- #include <sys/time.h>
- #endif
« no previous file with comments | « third_party/libevent/buffer.c ('k') | third_party/libevent/compat/sys/_libevent_time.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698