When integrating libuEv as a component in another piece of software,
that build system may set VERSION as an environment variable. We do
not want that version to be set as the version of libuEv.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
In (very) modern versions of binutils, for instance v2.25.1 in Ubuntu
15.10, complain about VERY common `crus` argument. This patch attempts
to silence this noise:
$ make -j5
CC uev.o
CC io.o
CC timer.o
CC signal.o
ARCHIVE libuev.a
LINK libuev.so.1
ar: `u' modifier ignored since `D' is the default (see `U')
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
Got very odd results on Debian Jessie when having the uev_private_t last
in uev_t. Turns out that when uev.c set "w->active = 0;" the w->fd data
member was written to instead.
Placing the private data first in uev_t is better practise, generally a
good thing for linked lists built on the BSD sys/queue.h API, looks a
lot better, but foremost works.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
It is non-trivial to set a separate environment variable (STATIC=1) when
descending into the libuEv subdirectory from an autoconf/automake based
project.
It is better to instead simplify the build process and always build both
.a and .so files.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
While comparing the library layout with libite, I noticed how the
formatting of the license paragraphs in all source files had been
garbled. This patch restores the orginal line breaks.
Note: Only whitespace changes, no change in licensing terms!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
There really does not exist a good reason for us sending a `uev_ctx_t *`
pointer as the first argument to event callbacks. If the callback needs
to reference the context, it can find the ctx pointer in the `uev_t *w`.
This patch removes the first argument from all callbacks and also fixes
a slight bug in that the event loop never returned the actual event that
triggered the callback!
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
There currenty is no *simple* way of preventing Coverity from being run
twice, so we just remove the clang build in the meantime :-/
See: travis-ci/travis-ci#1975
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
- Make sure to listen for EPOLLRDHUP in watchers so users can be
notified when a peer closes a connection.
- Handle EPOLLHUP and EPOLLERR gracefully. Even handle spurious
EPOLLHUP by means of an error counter. If we receive too many errors
we now restart the epoll fd and re-add all watchers.
- Return error from `epoll_ctl()` in `uev_watcher_stop()`
- Ignore any error from `uev_watcher_stop()` in `uev_watcher_set()`
- Move LIST_REMOVE() et al from io.c to core uev.c, should be
done for timer and signal callbacks as well, of course.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>