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

Rémi Denis-Courmont remi at remlab.net
Tue Mar 21 18:00:38 CET 2017


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?!

> +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)
>  {


-- 
雷米‧德尼-库尔蒙
https://www.remlab.net/



More information about the vlc-devel mailing list