mirror of
https://github.com/troglobit/libuev.git
synced 2026-10-23 11:24:34 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
35d3a0f185 | ||
|
|
441d53e46e | ||
|
|
0b19880f80 | ||
|
|
852bd506e8 | ||
|
|
98c8e9f8b1 | ||
|
|
9fc5227343 | ||
|
|
e613248392 | ||
|
|
ac5f01ea22 | ||
|
|
a0ddb4eae3 | ||
|
|
1e7720735f | ||
|
|
8010d76133 | ||
|
|
73459ca609 |
No files matched your search
+18
-3
@@ -4,6 +4,22 @@ Change Log
|
|||||||
All notable changes to the project are documented in this file.
|
All notable changes to the project are documented in this file.
|
||||||
|
|
||||||
|
|
||||||
|
[v1.4.1][] - 2016-04-22
|
||||||
|
-----------------------
|
||||||
|
|
||||||
|
### Changes
|
||||||
|
- Add some `pkg-config` integration tips for developers using libuEv
|
||||||
|
with GNU autotools in their projects.
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
- Add missing `SFD_CLOEXEC` and `TFD_CLOEXEC` to signal and timer file
|
||||||
|
descriptors. This prevents these file descriptors from "leaking" into
|
||||||
|
sub-processes of the parent thread. The kernel will atomically close
|
||||||
|
these descriptors for forked-off children calling the exec*() family
|
||||||
|
of syscalls.
|
||||||
|
- Minor coding style fixes and simplification of build scripts.
|
||||||
|
|
||||||
|
|
||||||
[v1.4.0][] - 2016-03-22
|
[v1.4.0][] - 2016-03-22
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
@@ -11,12 +27,11 @@ This release changes the header file namespace, which was silently
|
|||||||
introduced in [v1.2.1][]. Apologies for any problems this may cause!
|
introduced in [v1.2.1][]. Apologies for any problems this may cause!
|
||||||
|
|
||||||
### Changes
|
### Changes
|
||||||
|
|
||||||
- Change namespace for header files: `libuev/` to `uev/`, e.g. using
|
- Change namespace for header files: `libuev/` to `uev/`, e.g. using
|
||||||
`pkg-config` your C program must now `#include <uev/uev.h>`
|
`pkg-config` your C program must now `#include <uev/uev.h>`
|
||||||
- Support for EPOLLPRI events for I/O watchers, thanks to Markus Svilans
|
- Support for `EPOLLPRI` events for I/O watchers, thanks to Markus Svilans
|
||||||
- Simplified joystick example
|
- Simplified joystick example
|
||||||
- Updated README slightly
|
- Updated `README` slightly
|
||||||
|
|
||||||
|
|
||||||
[v1.3.1][] - 2016-02-02
|
[v1.3.1][] - 2016-02-02
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
||||||
Copyright (c) 2013-2015 Joachim Nilsson <troglobit()gmail!com>
|
Copyright (c) 2013-2016 Joachim Nilsson <troglobit()gmail!com>
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
|||||||
+1
-1
@@ -11,7 +11,7 @@ bench_LDADD = $(top_srcdir)/libuev.la
|
|||||||
|
|
||||||
libuev_la_CPPFLAGS = -D_GNU_SOURCE
|
libuev_la_CPPFLAGS = -D_GNU_SOURCE
|
||||||
libuev_la_CFLAGS = -W -Wall -Wextra
|
libuev_la_CFLAGS = -W -Wall -Wextra
|
||||||
libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:0:0
|
libuev_la_LDFLAGS = $(AM_LDFLAGS) -version-info 1:1:0
|
||||||
|
|
||||||
pkgconfigdir = $(libdir)/pkgconfig
|
pkgconfigdir = $(libdir)/pkgconfig
|
||||||
pkgconfig_DATA = libuev.pc
|
pkgconfig_DATA = libuev.pc
|
||||||
|
|||||||
@@ -216,6 +216,16 @@ The output from the `pkg-config` tool holds no surprises:
|
|||||||
The prefix path `/usr/local/` shown here is only the default. Use the
|
The prefix path `/usr/local/` shown here is only the default. Use the
|
||||||
`configure` script to select a different prefix when installing libuEv.
|
`configure` script to select a different prefix when installing libuEv.
|
||||||
|
|
||||||
|
For GNU autotools based projects, use the following in `configure.ac`:
|
||||||
|
|
||||||
|
# Check for required libraries
|
||||||
|
PKG_CHECK_MODULES([uev], [libuev >= 1.4.0])
|
||||||
|
|
||||||
|
and in your `Makefile.am`:
|
||||||
|
|
||||||
|
proggy_CFLAGS = $(uev_CFLAGS)
|
||||||
|
proggy_LDADD = $(uev_LIBS)
|
||||||
|
|
||||||
|
|
||||||
Joystick Example
|
Joystick Example
|
||||||
----------------
|
----------------
|
||||||
|
|||||||
@@ -229,7 +229,6 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
+1
-6
@@ -1,6 +1,4 @@
|
|||||||
# Use v2.61 for backwards compat with Ubuntu 12.04 LTS
|
AC_INIT(libuev, 1.4.1, https://github.com/troglobit/libuev/issues)
|
||||||
AC_PREREQ([2.61])
|
|
||||||
AC_INIT(libuEv, 1.4.0, https://github.com/troglobit/libuev/issues, libuev)
|
|
||||||
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
AM_INIT_AUTOMAKE([1.11 foreign no-dist-gzip dist-xz])
|
||||||
AM_SILENT_RULES([yes])
|
AM_SILENT_RULES([yes])
|
||||||
|
|
||||||
@@ -18,7 +16,4 @@ AC_ARG_ENABLE([examples],
|
|||||||
[enable_examples=yes], [])
|
[enable_examples=yes], [])
|
||||||
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "$enable_examples" = yes])
|
AM_CONDITIONAL([ENABLE_EXAMPLES], [test "$enable_examples" = yes])
|
||||||
|
|
||||||
AC_HEADER_STDC
|
|
||||||
AC_C_CONST
|
|
||||||
|
|
||||||
AC_OUTPUT
|
AC_OUTPUT
|
||||||
@@ -74,7 +74,6 @@ int main(void)
|
|||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* compile-command: "make joystick"
|
* compile-command: "make joystick"
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -134,7 +134,6 @@ int main(void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ int main(void)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* libuEv - Micro event loop library
|
/* libuEv - Micro event loop library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
||||||
* Copyright (c) 2013-2015 Joachim Nilsson <troglobit()gmail!com>
|
* Copyright (c) 2013-2016 Joachim Nilsson <troglobit()gmail!com>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -23,7 +23,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
||||||
#include "uev.h"
|
#include "uev.h"
|
||||||
|
|
||||||
|
|
||||||
@@ -91,7 +90,6 @@ int uev_io_stop(uev_t *w)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -82,7 +82,6 @@ int uev_watcher_stop (struct uev *w);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* libuEv - Micro event loop library
|
/* libuEv - Micro event loop library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
||||||
* Copyright (c) 2013-2015 Joachim Nilsson <troglobit()gmail!com>
|
* Copyright (c) 2013-2016 Joachim Nilsson <troglobit()gmail!com>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -52,7 +52,7 @@ int uev_signal_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int signo
|
|||||||
w->fd = -1;
|
w->fd = -1;
|
||||||
|
|
||||||
sigemptyset(&mask);
|
sigemptyset(&mask);
|
||||||
fd = signalfd(-1, &mask, SFD_NONBLOCK);
|
fd = signalfd(-1, &mask, SFD_NONBLOCK | SFD_CLOEXEC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -151,7 +151,6 @@ int uev_signal_stop(uev_t *w)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* libuEv - Micro event loop library
|
/* libuEv - Micro event loop library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
||||||
* Copyright (c) 2013-2015 Joachim Nilsson <troglobit()gmail!com>
|
* Copyright (c) 2013-2016 Joachim Nilsson <troglobit()gmail!com>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -67,7 +67,7 @@ int uev_timer_init(uev_ctx_t *ctx, uev_t *w, uev_cb_t *cb, void *arg, int timeou
|
|||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
|
|
||||||
fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK);
|
fd = timerfd_create(CLOCK_MONOTONIC, TFD_NONBLOCK | TFD_CLOEXEC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -169,7 +169,6 @@ int uev_timer_stop(uev_t *w)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/* libuEv - Micro event loop library
|
/* libuEv - Micro event loop library
|
||||||
*
|
*
|
||||||
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
* Copyright (c) 2012 Flemming Madsen <flemming!madsen()madsensoft!dk>
|
||||||
* Copyright (c) 2013-2015 Joachim Nilsson <troglobit()gmail!com>
|
* Copyright (c) 2013-2016 Joachim Nilsson <troglobit()gmail!com>
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
* of this software and associated documentation files (the "Software"), to deal
|
* of this software and associated documentation files (the "Software"), to deal
|
||||||
@@ -36,8 +36,9 @@
|
|||||||
|
|
||||||
static int _init(uev_ctx_t *ctx, int close_old)
|
static int _init(uev_ctx_t *ctx, int close_old)
|
||||||
{
|
{
|
||||||
int fd = epoll_create1(EPOLL_CLOEXEC);
|
int fd;
|
||||||
|
|
||||||
|
fd = epoll_create1(EPOLL_CLOEXEC);
|
||||||
if (fd < 0)
|
if (fd < 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@@ -311,10 +312,8 @@ int uev_run(uev_ctx_t *ctx, int flags)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local Variables:
|
* Local Variables:
|
||||||
* version-control: t
|
|
||||||
* indent-tabs-mode: t
|
* indent-tabs-mode: t
|
||||||
* c-file-style: "linux"
|
* c-file-style: "linux"
|
||||||
* End:
|
* End:
|
||||||
|
|||||||
Reference in new issue
Block a user