On 2013.05.29 23:25, Hans de Goede wrote:
> Hi,
>
> On 05/30/2013 12:17 AM, Sean McBride wrote:
>> On Thu, 30 May 2013 00:17:11 +0200, Hans de Goede said:
>>
>>>> IMHO you should use LC_MESSAGES in the usual way instead
>>>> of inventing your own API.  I.e. libusb_strerror() internally
>>>> calls setlocale(LC_MESSAGES, NULL) to query the locale.

Which is expected to work fine on POSIX but *may* not on Windows [1].

I do remember spending quite a lot of time trying to get gettext and 
POSIX like localization going on Windows, but, with Windows being 
Windows, it didn't work that well (then again, we were trying to use the 
GNU localization tools).

Sure, if you spend a lot of time (NB: patches are _always_ welcome), you 
might be able to get a POSIX-like mechanism going, but it looks to me 
like we're departing from KISS here. POSIX-like everywhere != KISS.

So here's the deal: As far as I'm concerned, you can propose whatever 
you like, but please make sure it does works on Windows without adding 
the expected complexity that comes from trying to be POSIX on non-POSIX.

Regards,

/Pete

PS: I also think that if we go for adding a stelocale, it should be 
called libusb_setlocale() rather than libusb_set_strerror_locale(). Or 
do we plan to have different setlocale for different API calls?

[1] 
http://www.kipras.com/blog/getting-gettext-to-work-in-apache-on-windows/96:
"LC_MESSAGES is an undefined constant on windows machines, and defining 
it to contain the same value as it does on Linux machines, doesn’t do 
any good"

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to