Hello,
I made a patch to add support for nanosecond timestamps in ev_stat.
Please review and consider to merge.
Thanks!
--
WBR,
Roman Tsisyk <[email protected]>
http://tarantool.org/ - an efficient in-memory data store and a Lua
application server
Index: ev.c
===================================================================
RCS file: /schmorpforge/libev/ev.c,v
retrieving revision 1.448
diff -U 8 -r1.448 ev.c
--- ev.c 24 Jul 2012 16:28:08 -0000 1.448
+++ ev.c 12 May 2015 14:53:01 -0000
@@ -3941,16 +3952,25 @@
|| prev.st_nlink != w->attr.st_nlink
|| prev.st_uid != w->attr.st_uid
|| prev.st_gid != w->attr.st_gid
|| prev.st_rdev != w->attr.st_rdev
|| prev.st_size != w->attr.st_size
|| prev.st_atime != w->attr.st_atime
|| prev.st_mtime != w->attr.st_mtime
|| prev.st_ctime != w->attr.st_ctime
+# if HAVE_STRUCT_STAT_ST_MTIM
+ || prev.st_atim.tv_nsec != w->attr.st_atim.tv_nsec
+ || prev.st_mtim.tv_nsec != w->attr.st_mtim.tv_nsec
+ || prev.st_ctim.tv_nsec != w->attr.st_ctim.tv_nsec
+# elif HAVE_STRUCT_STAT_ST_MTIMENSEC
+ || prev.st_atimensec != w->attr.st_atimensec
+ || prev.st_mtimensec != w->attr.st_mtimensec
+ || prev.st_ctimensec != w->attr.st_ctimensec
+# endif
) {
/* we only update w->prev on actual differences */
/* in case we test more often than invoke the callback, */
/* to ensure that prev is always different to attr */
w->prev = prev;
#if EV_USE_INOTIFY
if (fs_fd >= 0)
Index: libev.m4
===================================================================
RCS file: /schmorpforge/libev/libev.m4,v
retrieving revision 1.15
diff -U 8 -r1.15 libev.m4
--- libev.m4 20 Feb 2011 02:56:23 -0000 1.15
+++ libev.m4 12 May 2015 14:53:01 -0000
@@ -1,16 +1,18 @@
dnl this file is part of libev, do not make local modifications
dnl http://software.schmorp.de/pkg/libev
dnl libev support
AC_CHECK_HEADERS(sys/inotify.h sys/epoll.h sys/event.h port.h poll.h sys/select.h sys/eventfd.h sys/signalfd.h)
AC_CHECK_FUNCS(inotify_init epoll_ctl kqueue port_create poll select eventfd signalfd)
+AC_CHECK_MEMBERS([struct stat.st_mtim, struct stat.st_mtimensec], [], [], [[#include <sys/stat.h>]])
+
AC_CHECK_FUNCS(clock_gettime, [], [
dnl on linux, try syscall wrapper first
if test $(uname) = Linux; then
AC_MSG_CHECKING(for clock_gettime syscall)
AC_LINK_IFELSE([AC_LANG_PROGRAM(
[#include <unistd.h>
#include <sys/syscall.h>
#include <time.h>],
_______________________________________________
libev mailing list
[email protected]
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev