On Wed, 26 Feb 2020, Lukasz Majewski wrote:

> > > hidden_def (__mq_timedsend)
> > > weak_alias (__mq_timedsend, mq_timedsend) [**]
> > > hidden_weak (mq_timedsend)  
> > 
> > If you have lib<name>_hidden_weak note you also need a corresponding 
> > lib<name>_hidden_proto, for the name of the weak alias.  But you
> > probably don't need to have lib<name>_hidden* for the weak alias at
> > all, just make sure internal calls use the internal name.
> 
> As fair as I can tell the weak_alias () is necessary for correct
> operation of mq_timedsend when external programs call it.

I wasn't commenting on the weak_alias call, but on the hidden_weak one.

If you have hidden_weak (mq_timedsend), you also need 
lib<name>_hidden_proto (mq_timedsend) in the internal header (and vice 
versa, hidden_proto implies you need hidden_weak).

You don't need hidden_weak (mq_timedsend) unless there is an *internal 
call to mq_timedsend from within the same library that defines it*.

Since such an internal call could just use __mq_timedsend instead, you 
probably don't need hidden_weak / hidden_proto for mq_timedsend.

(If you don't have an internal call to __mq_timedsend, you don't need the 
hidden_* for that name either.)

-- 
Joseph S. Myers
jos...@codesourcery.com

Reply via email to