[libcxx-commits] [libcxx] [libc++] Deprecates std::errc constants. (PR #80542)

via libcxx-commits libcxx-commits at lists.llvm.org
Tue Apr 9 11:31:14 PDT 2024


tbodt wrote:

> At first blush, I was surprised by this. However, `ENODATA` is a POSIX errno value, and it is obsolescent in POSIX as well: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/errno.h.html The same is true for `ETIME`, `ENOSTR`, and `ENOSR`.

The thing is, there's a name collision here. Linux never implemented STREAMS and thus never added these error codes as defined in POSIX, but they did define ENODATA as a Linux specific error used (afaik) only to mean "the extended attribute you tried to reference does not exist". This code is not deprecated and is often necessary in code that deals with extended attributes.

https://github.com/llvm/llvm-project/pull/80542


More information about the libcxx-commits mailing list