On Fri, 26 Feb 2010, Yasuhiko Kamata wrote:

> Hello, Davide,
> 
> Thanks for good news!
> 
> But I've just found a problem on a bit older Linux system.
> 
> On 1.27, XMail seems to use a eventfd-based event system for faster
> shutdown. But two flags (EFD_NONBLOCK, EFD_CLOEXEC) cannot be used
> (not defined) on Linux kernel earlier than 2.6.27 as described in man
> page (eventfd(3)).
> 
> Since "Makefile.lnx" only checks the existence of "sys/eventfd.h",
> a compilation of XMail-1.27 fails on "Linux < 2.6.27" distributions
> (this failure is caused by glibc header actually).
> 
> I think "Makefile.lnx" should test not only the presence of it,
> but also whether two flags is defined or not.
> 
> So I've just created a very simple patch (just grepping instead of
> checking file) as follows.
> 
> --- xmail-1.27_orig/Makefile.lnx      2010-02-26 12:33:44.000000000 +0900
> +++ xmail-1.27/Makefile.lnx   2010-02-26 21:42:01.000000000 +0900
> @@ -44,7 +44,9 @@
>  MAINSRC = MainLinux.cpp
>  SYSSRCS = SysDepLinux.cpp SysDepUnix.cpp
>  
> -ifeq ($(wildcard /usr/include/sys/eventfd.h), )
> +EVENTFD_DEFINE = $(shell grep -ri EFD_NONBLOCK /usr/include/sys/eventfd.h > 
> /dev/null 2>&1 && echo 1)

Done, but this better be:

ifeq ($(shell grep -q EFD_NONBLOCK /usr/include/sys/eventfd.h > /dev/null 2>&1 
&& echo 1), )


- Davide


_______________________________________________
xmail mailing list
xmail@xmailserver.org
http://xmailserver.org/mailman/listinfo/xmail

Reply via email to