@@ -55,9 +55,11 @@ cc_library(
5555 "epolltable-internal.h" ,
5656 "evbuffer-internal.h" ,
5757 "evconfig-private.h" ,
58+ "evconfig-private_android.h" ,
5859 "evconfig-private_apple.h" ,
5960 "evconfig-private_linux.h" ,
6061 "event-internal.h" ,
62+ "event2-config_android.h" ,
6163 "event2-config_apple.h" ,
6264 "event2-config_common.h" ,
6365 "event2-config_linux.h" ,
@@ -76,7 +78,12 @@ cc_library(
7678 "strlcpy-internal.h" ,
7779 "time-internal.h" ,
7880 "util-internal.h" ,
79- ],
81+ ] + select ({
82+ "@platforms//os:windows" : [
83+ "wepoll.h" ,
84+ ],
85+ "//conditions:default" : [],
86+ }),
8087 visibility = [":__subpackages__" ],
8188)
8289
@@ -115,7 +122,6 @@ cc_library(
115122 "devpoll.c" ,
116123 "epoll.c" ,
117124 "event.c" ,
118- "event_tagging.c" ,
119125 "evmap.c" ,
120126 "evport.c" ,
121127 "evthread.c" ,
@@ -131,11 +137,16 @@ cc_library(
131137 "strlcpy.c" ,
132138 "watch.c" ,
133139 ] + select ({
140+ "@platforms//os:linux" : ["signalfd.c" ],
141+ "@platforms//os:android" : ["signalfd.c" ],
142+ "//conditions:default" : [],
143+ }) + select ({
134144 "@platforms//os:windows" : [
135145 "buffer_iocp.c" ,
136146 "bufferevent_async.c" ,
137147 "event_iocp.c" ,
138148 "evthread_win32.c" ,
149+ "wepoll.c" ,
139150 "win32select.c" ,
140151 ],
141152 "//conditions:default" : [],
@@ -171,8 +182,10 @@ cc_library(
171182cc_library (
172183 name = "event_extra_private_headers" ,
173184 hdrs = [
185+ "evdns-internal.h" ,
174186 "evrpc-internal.h" ,
175187 "http-internal.h" ,
188+ "sha1.h" ,
176189 ],
177190 visibility = [":__subpackages__" ],
178191)
@@ -188,6 +201,7 @@ EVENT_EXTRA_PUBLIC_HEADERS = [
188201 "include/event2/rpc.h" ,
189202 "include/event2/rpc_compat.h" ,
190203 "include/event2/rpc_struct.h" ,
204+ "include/event2/ws.h" ,
191205 "include/evhttp.h" ,
192206 "include/evrpc.h" ,
193207]
@@ -196,8 +210,15 @@ cc_library(
196210 name = "event_extra" ,
197211 srcs = [
198212 "evdns.c" ,
213+ "event_tagging.c" ,
199214 "evrpc.c" ,
200215 "http.c" ,
216+ # sha1.c derives endianness from BYTE_ORDER, which it obtains via
217+ # EVENT__HAVE_ENDIAN_H / EVENT__HAVE_SYS_ENDIAN_H from the config
218+ # headers. All supported platforms set at least one of those macros,
219+ # so no per-target byte-order copt is required here.
220+ "sha1.c" ,
221+ "ws.c" ,
201222 ],
202223 hdrs = EVENT_EXTRA_PUBLIC_HEADERS ,
203224 includes = ["include" ],
@@ -213,12 +234,8 @@ cc_library(
213234 ":event_core" ,
214235 ":event_core_private_headers" ,
215236 ":event_extra_private_headers" ,
216- ] + select ({
217- "@platforms//os:windows" : [
218- "//compat" ,
219- ],
220- "//conditions:default" : [],
221- }),
237+ "//compat" ,
238+ ],
222239)
223240
224241cc_library (
@@ -229,16 +246,17 @@ cc_library(
229246 ":event_core" ,
230247 ":event_extra" ,
231248 ] + select ({
232- "@platforms//os:linux" : [":event_pthreads" ],
233- "@platforms//os:macos" : [":event_pthreads" ],
234- "//conditions:default" : [],
249+ "@platforms//os:windows" : [],
250+ "//conditions:default" : [":event_pthreads" ],
235251 }),
236252)
237253
238254cc_library (
239255 name = "event_openssl_private_headers" ,
240256 hdrs = [
257+ "mbedtls-compat.h" ,
241258 "openssl-compat.h" ,
259+ "ssl-compat.h" ,
242260 ],
243261 tags = [
244262 "requires_openssl" ,
@@ -256,6 +274,7 @@ cc_library(
256274 name = "event_openssl" ,
257275 srcs = [
258276 "bufferevent_openssl.c" ,
277+ "bufferevent_ssl.c" ,
259278 ],
260279 includes = ["include" ],
261280 tags = [
@@ -274,15 +293,13 @@ cc_library(
274293cc_library (
275294 name = "event_pthreads" ,
276295 srcs = select ({
277- "@platforms//os:linux" : ["evthread_pthread.c" ],
278- "@platforms//os:macos" : ["evthread_pthread.c" ],
279- "//conditions:default" : [],
296+ "@platforms//os:windows" : [],
297+ "//conditions:default" : ["evthread_pthread.c" ],
280298 }),
281299 includes = ["include" ],
282300 linkopts = select ({
283- "@platforms//os:linux" : ["-pthread" ],
284- "@platforms//os:macos" : ["-pthread" ],
285- "//conditions:default" : [],
301+ "@platforms//os:windows" : [],
302+ "//conditions:default" : ["-pthread" ],
286303 }),
287304 visibility = ["//visibility:public" ],
288305 deps = [
0 commit comments