This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix C11 conformance issues


On 07/25/2018 04:03 PM, Florian Weimer wrote:
> Strong definitions of flockfile, funlockfile, ftrylockfile can conflict
> with application symbols when linking statically.

This looks OK to me for 2.28.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>

> 2018-07-25  Florian Weimer  <fweimer@redhat.com>
> 
> 	* htl/lockfile.c (flockfile, funlockfile, ftrylockfile): Use weak
> 	aliases for symbols not in the implementation namespace.
> 
> diff --git a/htl/lockfile.c b/htl/lockfile.c
> index 7828d47dae..1d0ab88b13 100644
> --- a/htl/lockfile.c
> +++ b/htl/lockfile.c
> @@ -53,8 +53,8 @@ int _IO_ftrylockfile (FILE *)
>       __attribute__ ((alias ("_cthreads_ftrylockfile")));
>  
>  void flockfile (FILE *)
> -     __attribute__ ((alias ("_cthreads_flockfile")));
> +     __attribute__ ((weak, alias ("_cthreads_flockfile")));
>  void funlockfile (FILE *)
> -     __attribute__ ((alias ("_cthreads_funlockfile")));
> +     __attribute__ ((weak, alias ("_cthreads_funlockfile")));
>  int ftrylockfile (FILE *)
> -     __attribute__ ((alias ("_cthreads_ftrylockfile")));
> +     __attribute__ ((weak, alias ("_cthreads_ftrylockfile")));

OK.

c.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]