[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [Libevent-users] Minimal configuration



On Wed, Jan 30, 2013 at 7:53 PM, Ralph Castain <rhc@xxxxxxxxxxxx> wrote:
> Hi folks
>
> We're trying to support a system that has a really minimal OS on it - e.g., no sockets or TCP/IP stack. Looking at libevent, and particularly at evutil.c, we don't see a way to --disable-sockets.
>
> Has anyone looked at considering such an option? Basically, what we need is to strip libevent down so that a timer and signal handler
> callback interface is all that's left.
>
> We can hack the code ourselves to get there, but it would be nice to avoid a "custom" branch. We could help with a patch if someone would like to provide a little design guidance to avoid making this ugly.

I'd take a patch like that. It's an extreme case, but if you've got an
application for it, you've got an application for it.

Initial thoughts: I'd suggest that it be called
--disable-socket-events or something.  If there are other areas you
want to disable (evbuffers, bufferevents, dns, etc), they should
probably get their own autoconf options names.  When disabling whole
files, use automake conditions; when disabling parts of files, use
#ifdef.  In extremis, consider splitting files, but only when it's a
genuinely mixed-up file.

In addition to making the code not get built, I'd also suggest
disabling the functions in the header files.

Of course, the patch should really be against git master, not against
2.0 -- this is too featurelike for 2.0 for now.

Any more thoughts/questions here?


best wishes,
-- 
Nick
***********************************************************************
To unsubscribe, send an e-mail to majordomo@xxxxxxxxxxxxx with
unsubscribe libevent-users    in the body.