[libdispatch-dev] [PATCH] use libkqueue if sys/event.h is missing

Robert N. M. Watson robert at fledge.watson.org
Mon Nov 2 02:10:50 PST 2009


On 2 Nov 2009, at 03:16, Mark Heily wrote:

> Robert Watson wrote:
>> Given that package installation conventions vary by OS/distribution  
>> (/opt, /usr/local, /usr, ...), would it might make more sense to  
>> simply add a "--with-kqueue-includ-path" argument to configure?
>
> Paolo suggested using pkg-config and the PKG_CHECK_MODULES macro to  
> give some flexibility about where the headers and libraries are  
> installed. I'll submit a new patch that uses pkg-config and  
> PKG_CHECK_MODULES.

Sounds good.

>> Are you able to get basic test programs running with libdispatch  
>> and libkqueue on Linux now?
>
> I need to finish working on EVFILT_TIMER before attempting to run  
> the libdispatch test suite. Currently, libkqueue has pretty good  
> support for the READ, WRITE, SIGNAL, and VNODE filters. The TIMER  
> filter is about 50% complete, and I haven't started on the USER or  
> PROC filters. I have written about 30 unit tests and have almost  
> 100% success when running the test suite.
>
> Just for fun, I tried running 'make' inside of the libdispatch  
> testing/ directory, and it looks like there are some problems.  
> Here's the output:

The current test tools are fairly Mac OS X-specific; I've ported some,  
but not all, to FreeBSD. If you have additional libdispatch unit  
tests, it would be great to get them into the libdispatch tree.

On a similar note, if you have kqueue regression tests, I'd love to  
get those into the FreeBSD source tree as well -- kqueue is quite a  
nice API, but the lack of thorough regression tests has always worried  
me. I think we have a few in the tree now that exercise kqueue as part  
of testing other things (such as sockets and fifos), but nothing  
really thorough.

Robert

>
> cc -Werror -Wall -Wextra -Wshadow -mdynamic-no-pic -Os -g  -arch  
> i386  -arch x86_64  -arch ppc -DDISPATCH_NO_LEGACY -Werror -Wall - 
> Wextra -Wshadow -mdynamic-no-pic -Os -g  -arch i386  -arch x86_64  - 
> arch ppc -DDISPATCH_NO_LEGACY  -c -o harness.o harness.c
> cc: i386: No such file or directory
> cc: x86_64: No such file or directory
> cc: ppc: No such file or directory
> cc: i386: No such file or directory
> cc: x86_64: No such file or directory
> cc: ppc: No such file or directory
> cc1: error: unrecognized command line option "-mdynamic-no-pic"
> cc1: error: unrecognized command line option "-mdynamic-no-pic"
> cc1: error: unrecognized command line option "-arch"
> cc1: error: unrecognized command line option "-arch"
> cc1: error: unrecognized command line option "-arch"
> cc1: error: unrecognized command line option "-arch"
> cc1: error: unrecognized command line option "-arch"
> cc1: error: unrecognized command line option "-arch"
>




More information about the libdispatch-dev mailing list