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: libm error handling


I'm glad to see an effort to clean up this historical mess.

On Tue, Apr 30, 2013 at 04:30:43PM +0000, Joseph S. Myers wrote:
>   As far as I can tell, POSIX only reserves the identifier signgam
>   with external linkage when math.h is included with _XOPEN_SOURCE
>   defined appropriately to enable XSI extensions, not otherwise (there
>   is a long list of symbols with external linkage that are always
>   reserved, and it does not include signgam).  So I think the
>   following should work for a fix: the lgamma symbol versions
>   presently in use are made into compat symbol versions, for existing
>   binaries where lgamma is expected to set signgam (except for
>   _ISOC_).  The new version of the lgamma symbol does not set signgam,
>   while a separate __lgamma_xsi function is defined that does set
>   signgam, and is used when math.h is included with appropriate
>   feature test macros defined.

This should not be necessary. signgam should simply be a weak alias
for __signgam or similar, and lgamma should only write to __signgam.
However, some serious black magic may be needed with symbol versioning
to keep old binaries happy...

Rich


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