[vlc-devel] [PATCH 1/3] fixups: set errno to ENOSYS when calling newlocale()
Rémi Denis-Courmont
remi at remlab.net
Sat Sep 12 20:04:56 CEST 2015
Le 2015-09-12 20:23, Sean McGovern a écrit :
> We're not actually providing an implementation here.
> ---
> include/vlc_fixups.h | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/include/vlc_fixups.h b/include/vlc_fixups.h
> index 305de87..2c3ed52 100644
> --- a/include/vlc_fixups.h
> +++ b/include/vlc_fixups.h
> @@ -236,6 +236,7 @@ int posix_memalign (void **, size_t, size_t);
>
> /* locale.h */
> #ifndef HAVE_USELOCALE
> +#include <errno.h>
> #define LC_ALL_MASK 0
> #define LC_NUMERIC_MASK 0
> #define LC_MESSAGES_MASK 0
> @@ -253,6 +254,7 @@ static inline void freelocale(locale_t loc)
> static inline locale_t newlocale(int mask, const char * locale,
> locale_t base)
> {
> (void)mask; (void)locale; (void)base;
> + errno = ENOSYS;
That seems fine... but:
1) While errno is in ISO C, I am not sure ENOSYS is portable.
2) The VLC build is screwed if it uses this code anyway. Floating point
numbers serialization/deserialization especially.
> return NULL;
> }
> #endif
--
Rémi Denis-Courmont
http://www.remlab.net/
More information about the vlc-devel
mailing list