[vlc-devel] [PATCH 1/3] lua: equalizer: use locale.h only if uselocale is available

Rémi Denis-Courmont remi at remlab.net
Wed May 20 17:55:51 CEST 2020


Le keskiviikkona 20. toukokuuta 2020, 17.41.32 EEST Alexandre Janniaux a écrit 
:
> Like is done in src/config/file.c. It prevents including locale.h in
> case it doesn't provide what we need. Instead, vlc_fixup will be used
> and uselocale/newlocale will be no-op.

That's just moving the *non*-issue of including a potentially useless 
<locale.h>. Some platforms define uselocale() in the wrong header anyway.

> ---
>  modules/lua/libs/equalizer.c | 7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/modules/lua/libs/equalizer.c b/modules/lua/libs/equalizer.c
> index 50f6df02487..92c10671c6c 100644
> --- a/modules/lua/libs/equalizer.c
> +++ b/modules/lua/libs/equalizer.c
> @@ -41,11 +41,10 @@
>  #include "../libs.h"
>  #include "../vlc.h"
>  #include "../../audio_filter/equalizer_presets.h"
> -
> -#if !defined _WIN32
> -# include <locale.h>
> -#else
> +#if defined _WIN32
>  # include <windows.h>
> +#elif defined (HAVE_USELOCALE)
> +# include <locale.h>
>  #endif
> 
>  #ifdef __APPLE__


-- 
レミ・デニ-クールモン
http://www.remlab.net/





More information about the vlc-devel mailing list