On 2013.03.21 08:19, Hans de Goede wrote:
> lets have the HID cap flag set on Linux too.

Thanks. I mean it.

> But please, lets
> clearly document that it requires detach on Linux.

Sure. I'll work something out to try to make that clear, unless you 
already have an idea of what you would like to see.

> As for having a detach cap flag, that sounds like a good idea too, actually
> if we had only had that from day one code using detach could be a lot
> simpler then it is now.

Yeah. Having to add a #ifdef __linux__ right in the middle of code from 
a sample supposed to demonstrate the features of a cross platform 
library sure looks sucky. Outside of headers, if we need platform 
specific #ifdefs, then I'd say that we're doing a poor job. I wouldn't 
mind removing that annoyance and using a DETACH cap instead.

Do you, or anyone, have a preference for how this new cap should be 
called? I don't think LIBUSBX_HAS_DETACH will fly, as we could argue 
that Windows also has _detach - it just returns an error when called.

Right now, I'm leaning towards LIBUSBX_MAY_REQUIRE_DETACH or 
LIBUSBX_DEVICE_MAY_NEED_DETACH, but I wouldn't mind hearing other opinions.

> Unfortunately adding it now won't allow cleaning up
> existing
> code (outside if the libusbx tree) since that will need to keep working
> with
> older libusbx versions too.

Well, I can't really fault Daniel for introducing _detach when he 
crafted libusb on Linux. Still, we should have tried to do something 
about it early on, when platforms were added, as it's been sticking like 
a sore thumb ever since.

Regards,

/Pete

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to