bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Fix libunistring in MS-Windows locales


From: Daiki Ueno
Subject: Re: Fix libunistring in MS-Windows locales
Date: Sat, 19 Jul 2014 08:11:11 +0900
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Eli Zaretskii <address@hidden> writes:

>   . __thread works as expected in MinGW GCC since version 4.5.0
>
>   . DLLs that use __thread (a.k.a. "implicit TLS") cannot be safely
>     loaded at run time, using LoadLibrary, on Windows versions before
>     Vista, they can only be loaded at program startup time (IOW, the
>     corresponding -lLIBRARY switch should be passed on the link
>     command line)
>
>   . DLLs that need to be able to support LoadLibrary on Windows XP and
>     older need to use explicit TLS API functions, which requires a
>     call to TlsAlloc in the DllMain function, another complication

Thanks for checking in detail.  Then it would make more sense to use
locking rather than TLS.

> Actually, I see that libunistring already includes functions for
> locking (which on Windows wrap the 2 APIs I mentioned above).  So I
> guess it's best to use them.

Yes, could you create a patch in that direction?  By the way, though a
minor nitpicking, the indentation in gl_locale_name_thread still doesn't
look correct (there is a variable declaration in the middle of block).

Regards,
-- 
Daiki Ueno



reply via email to

[Prev in Thread] Current Thread [Next in Thread]