Re: [PATCH 1/1] libc: Added implementations and prototypes for

Brian Inglis <[email protected]>
Newsgroups gmane.comp.lib.newlib
Organization Systematic Software
Message-ID <[email protected]>
On 2021-07-29 03:23, Corinna Vinschen wrote:
> On Jul 28 15:13, Joel Sherrill wrote:
>> On Wed, Jul 28, 2021, 2:54 PM C Howland wrote:
>>>> On Wed, Jul 28, 2021 at 1:46 PM Corinna Vinschen wrote:
>>>>> On Jul 28 09:25, Brian Inglis wrote:
>>>>>> On 2021-07-28 03:11, Corinna Vinschen wrote:
>>>>>>> On Jul 24 10:37, Matt Joyce wrote:
>>>>>>>> +#if __GNU_VISIBLE

>>>>>>> What we need, in fact, is a __POSIX_VISIBLE guard, but
>>>>>>> here's the problem: As far as I can see, the Issue 8
>>>>>>> draft does not yet define a version number.
>>>>>>> If anybody has better information or a good idea how to 
>>>>>>> guard this new API in the meantime, I'm all ears.

>>>>>> Current values are:
>>>>>>
>>>>>> __POSIX_VISIBLE 199009
>>>>>> __POSIX_VISIBLE 199209
>>>>>> __POSIX_VISIBLE 199309
>>>>>> __POSIX_VISIBLE 199506
>>>>>> __POSIX_VISIBLE 200112
>>>>>> __POSIX_VISIBLE 200809
>>>>>> __POSIX_VISIBLE 201402
> 
> Where did you find the latter one?  Per the Open Group docs
> https://pubs.opengroup.org/onlinepubs/9699919799/ the latest valid value
> for _POSIX_C_SOURCE is still 200809, even with POSIX.1-2017.

Searched all installed include files for all __POSIX_VISIBLE date 
expressions [Paste As Quotation avoids wrapping commands and output]:

> $ grep '__POSIX_VISIBLE.*[12][90][0-9][0-9][01][0-9]' /usr/{,*86*/sys-root/*/}include/**/*.h

To answer your question:

 > $ grep '__POSIX_VISIBLE.*2014' /usr/{,*86*/sys-root/*/}include/**/*.h
> /usr/include/pthread.h:#if __XSI_VISIBLE >= 500 || __POSIX_VISIBLE >= 200112 || __cplusplus >= 201402L

I used sed to extract and standardize so I could sort -u to get the 
list, which I saved and added a few comments to:

> /* POSIX-version-dates.h - POSIX dates found in headers and related standards */
> 
> #define	__POSIX_VISIBLE 199009	/* Issue 1 */
> #define	__POSIX_VISIBLE 199209	/* Issue 2 */
> #define	__POSIX_VISIBLE 199309	/* Issue 3 UNIX 93 */
> #define	__POSIX_VISIBLE 199506	/* Issue 4 SUS V1 UNIX 95 XPG4 COSE Spec 1170 */
> #define	__POSIX_VISIBLE 200112	/* Issue 5 SUS V3 UNIX 03 */
> #define	__POSIX_VISIBLE 200809	/* Issue 6 SUS V4 */
> #define	__POSIX_VISIBLE 201402	/* Issue 7 SUS V4 TC1 UNIX V7 */
> #define	__POSIX_VISIBLE 202202?	/* Issue 8 SUS V5? UNIX V8? */

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.
[Data in binary units and prefixes, physical quantities in SI.]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.