void noinline stat_timer_cb (EV_P_ ev_timer *w_, int revents);
#if EV_USE_INOTIFY
-# define EV_INOTIFY_BUFSIZE ((PATH_MAX + sizeof (struct inotify_event)) + 2048)
+# define EV_INOTIFY_BUFSIZE 8192
static void noinline
infy_add (EV_P_ ev_stat *w)
ev_timer_start (EV_A_ &w->timer); /* this is not race-free, so we still need to recheck periodically */
/* monitor some parent directory for speedup hints */
- if (errno == ENOENT || errno == EACCES)
+ if ((errno == ENOENT || errno == EACCES) && strlen (w->path) < 4096)
{
- char path [PATH_MAX];
+ char path [4096];
strcpy (path, w->path);
do
break; /* whoops, no '/', complain to your admin */
*pend = 0;
- w->wd = inotify_add_watch (fs_fd, path, IN_DELETE_SELF | IN_CREATE | IN_MOVED_TO | IN_MASK_ADD);
+ w->wd = inotify_add_watch (fs_fd, path, mask);
}
while (w->wd < 0 && (errno == ENOENT || errno == EACCES));
}
static void noinline
infy_del (EV_P_ ev_stat *w)
{
- WL w_;
int slot;
int wd = w->wd;
infy_add (EV_A_ w); /* re-add, no matter what */
}
- stat_timer_cb (EV_P_ &w->timer, 0);
+ stat_timer_cb (EV_A_ &w->timer, 0);
}
}
}
#define forkmax ((loop)->forkmax)
#define forkcnt ((loop)->forkcnt)
#define fs_fd ((loop)->fs_fd)
-#define fs_w ((loop)->fs_w);
+#define fs_w ((loop)->fs_w)
#define fs_hash ((loop)->fs_hash)
s/\bevsignal.h\b//g;
s/-Wall//;
s/^(man_MANS\s*=)/$1 ev.3 /;
- s/^(EXTRA_DIST\s*=)/$1 ev.h ev_vars.h ev_wrap.h event_compat.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod ev.html /;
+ s/^(EXTRA_DIST\s*=)/$1 libev.m4 ev.h ev_vars.h ev_wrap.h event_compat.h ev_epoll.c ev_select.c ev_poll.c ev_kqueue.c ev_port.c ev_win32.c ev.3 ev.pod ev.html /;
s/^(include_HEADERS\s*=)/$1 ev.h event_compat.h /;
s/^(CORE_SRC\s*=)/$1 ev.c /;
s/^(SYS_LIBS\s*=)/$1 -lm /;
s/AC_LIBOBJ\(evport\)/: ;/g;
s/AC_LIBOBJ\(signal\)/: ;/g;
s/AC_LIBOBJ\(rtsig\)/: ;/g;
+ print "m4_include([libev.m4])\n" if /^AC_OUTPUT/;
print;
' <$LE/configure.in >configure.in
aclocal-1.7
automake-1.7 --add-missing
autoconf
+autoheader
libtoolize
CC="ccache gcc" ./configure --prefix=/opt/libev --disable-shared "$@"