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

Re: [Libevent-users] Something to consider for future



Hi, Ralph!

On Tue, Sep 7, 2010 at 11:04 AM, Ralph Castain <rhc@xxxxxxxxxxxx> wrote:
 [...]
> (b) we need to modify it somewhat to get things working correctly across the broad range of our installed base.

Any chances of getting the patches here upstreamed?  "Working
correctly across a broad install base" sounds like a feature worth
merging into the main distribution. ;)

> It is my understanding that quite a few software packages also embed libevent in their distributions, so this is a fairly common problem. It would make life much easier, therefore, if you only declared the true public APIs as public symbols, defining all internal-only functions as "static".

Pretty much every symbol that's used only in a single module *is*
declared static right now.  (If we missed some, that's worth fixing:
just send in a patch.)  The remaining non-static symbols are ones
shared between modules, and of course C doesn't let you make those
static.  The right solution here is probably to manually tell the
linker about what symbols to export and what symbols not to export.
On windows, this is the dllexport/dllimport stuff stuff.  With gcc4 on
other platforms, this is the __attribute__((visibility(...))) stuff.
( http://gcc.gnu.org/wiki/Visibility )

I'd like to move this way in Libevent 2.1, but I'm not sure on the
timeframe, since it's a fair amount of work.  If somebody commits to
writing up and testing the code here, that'll improve the odds of it
getting done.

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