summaryrefslogtreecommitdiffstats
path: root/src/util/k5ev/README
blob: 1165f37f70ccd21363897f2c02b885980c141b3f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
This directory builds a private libverto module using an embedded
libev with renamed symbols (so we don't leak libev symbols into the
namespace on platforms where we can't control the export list).  The
module is not intended to be used directly by applications, so it has
no header file.

libev has built-in support for this kind of embedding, so we don't
have to modify the libev sources.  Following libev's documentation,
the following files have been copied from the ev sources:

  ev.h
  ev_vars.h
  ev_wrap.h
  ev.c
  ev_select.c
  ev_poll.c
  ev_win32.c
  Symbols.ev

(Symbols.ev wasn't included in the 4.04 tar file due to an oversight,
so it is taken from the appropriate tag in libev's source repository.)

To rename the exported symbols, we create rename.h from Symbols.ev.
We also use Symbols.ev to construct the library export list.
(Renaming libev's symbols would be unnecessary if libev's embedding
had support for making its API symbols static, but it currently does
not.)  The source file verto-k5ev.c wraps ev.c with appropriate
embedding defines, and then defines the libverto module functions
using the slightly modified contents of libverto's verto-ev.c.