Including <cerrno> instead of <errno.h>, does it upset POSIX?

David Redondo kde at david-redondo.de
Wed Apr 14 14:27:13 BST 2021


Looking into the C++ 17 working draft (http://open-std.org/JTC1/SC22/WG21/
docs/papers/2017/n4659.pdf) <cerrno> is actually the same as the POSIX header.

In section 22.4 (page 517)
>The contents of the header<cerrno>are the same as the POSIX header<errno.h>, 
except thaterrnoshallbe defined as a macro. [Note:The intent is to remain in 
close alignment with the POSIX standard.— endnote] A separateerrnovalue shall 
be provided for each thread.

And at the bottom of 22.4.1
>The meaning of the macros in this header is defined by the POSIX standard.

Regards,
David

P.S. In the latest working draft this seems now to be section 19.4 instead




More information about the Kde-frameworks-devel mailing list