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: Problems with evolving feature test macros?


On Tue, 11 Mar 2014, Michael Kerrisk (man-pages) wrote:

> Over glibc versions, it looks as though you can get qecvt() exposed
> from <stdlib.h> by defining FTMs as follows
> 
>     Before glibc 2.10:
>         _SVID_SOURCE || _XOPEN_SOURCE >= 500 ||
>             (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED)
> 
>     glibc 2.10 to glibc 2.17
>         _SVID_SOURCE || (_XOPEN_SOURCE >= 500 ||
>             (_XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED) &&
>                 ! (_POSIX_C_SOURCE >= 200809L || _XOPEN_SOURCE >= 700))

As a further point: those clearly reflect bugs, given the absence of qecvt 
from the relevant standards.  In such cases, you can't reasonably expect 
past buggy states of glibc to be sane, only possibly states that actually 
reflect the standards containing a given interface.  And someone writing 
portable software using appropriate _POSIX_C_SOURCE or _XOPEN_SOURCE 
macros will need to decide to what extent they wish to work around bugs in 
the set of symbols exposed by those macros in old libraries.

If you wish to document bugs, documenting them in the BUGS section of the 
manpage seems most appropriate.

-- 
Joseph S. Myers
joseph@codesourcery.com


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