[vlc-devel] [PATCH 1/3] fixups: set errno to ENOSYS when calling newlocale()

Sean McGovern gseanmcg at gmail.com
Sun Sep 13 03:13:43 CEST 2015


On Sat, Sep 12, 2015 at 2:04 PM, Rémi Denis-Courmont <remi at remlab.net>
wrote:

> 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.


This patch is admittedly frivolous. Feel free to discard.

-- Sean McG.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20150912/3085e979/attachment.html>


More information about the vlc-devel mailing list