[patch] abstract socket support for xtrans

Bill Crawford billcrawford1970 at gmail.com
Sun Mar 19 09:34:12 PST 2006


On Sunday 19 March 2006 16:19, Daniel Stone wrote:

> Could you please rework this patch such that it:
>   * preferably causes a net reduction in LoC

Can probably make it break even by removing a lot of the #ifdef (most of the 
code will function quite happily if the support doesn't exist). I'm tempted 
to just take out the #ifdef and have it all happen at runtime (because if the 
bind() or connect() fail on the abstract address, it'll just fall back to the 
normal unix socket anyway).

>   * changes the platform test into a feature test (e.g. attempts to
>     create an abstract socket)

Done, but it'll need someone with a bit more experience to run over it and 
make sure it's portable.

>   * turns xtrans into a proper library. :)

I'd love to. It just needs some design choices about how to handle e.g. the 
current special-casing of X11_t for converting the port number, and so on. I 
do *not* want to end up with an enumeration for the library that's calling 
into xtrans. There are some ugly tricks, like maybe testing to see if port 
number is less than 100 and adding 6000 to it, maybe. The #ifdef for HPUX and 
the "old socket paths" is also a bit ugly, and needs a workaround (or 
preferably just removal, it's been there for so long, it might be time to 
just say "these are the paths that will be used now").

> Do that, and you're welcome to a CVS account, and your name up in lights
> as the xtrans maintainer.

Attractive as that is, I really need to get a job first :)



More information about the xorg mailing list