[vlc-devel] [PATCH v3 06/19] newlib/nacl: Provide flockfile implementation

Julian Scheel julian at jusst.de
Wed Mar 22 09:29:20 CET 2017


On 21.03.2017 18:00, Rémi Denis-Courmont wrote:
> Le maanantaina 20. maaliskuuta 2017, 17.57.23 EET Dennis Hamester a écrit :
>> From: Julian Scheel <julian at jusst.de>
>>
>> newlib provides an flockfile implementation via sys/io.h, which is
>> marked as internal. As we do not have a better alternative make use of
>> it here, albeit being marked as internal.
>>
>> Signed-off-by: Julian Scheel <julian at jusst.de>
>> ---
>>  compat/flockfile.c | 12 ++++++++++++
>>  1 file changed, 12 insertions(+)
>>
>> diff --git a/compat/flockfile.c b/compat/flockfile.c
>> index afe8a3e111..bf78139f93 100644
>> --- a/compat/flockfile.c
>> +++ b/compat/flockfile.c
>> @@ -56,8 +56,20 @@ int putc_unlocked (int c, FILE *stream)
>>  }
>>
>>  #else
>> +#ifdef __native_client__
>
> Why not elif?!

Changed for v4

>> +void flockfile (FILE *stream)
>> +{
>> +    _flockfile(stream);
>> +}
>> +
>> +void funlockfile (FILE *stream)
>> +{
>> +    _funlockfile(stream);
>> +}
>> +#else
>>  # error flockfile not implemented on your platform!
>>  #endif
>> +#endif
>>
>>  int getchar_unlocked (void)
>>  {
>
>



More information about the vlc-devel mailing list