Mail Archives: djgpp/2015/06/05/04:57:16
FWIW, as far as I could glean from drafts of C++ standards available
on the net, the C++ standards define the following errno values:
C++98 and C++03 still required only EDOM and ERANGE, perhaps with
EILSEQ (I cannot say, some drafts have EILSEQ, some don't).
C++11 stated Posix compliance, and therefore added all of the values
defined by Posix:
ECONNREFUSED EIO ENODEV ENOTEMPTY ERANGE
E2BIG ECONNRESET EISCONN ENOENT ENOTRECOVERABLE EROFS
EACCES EDEADLK EISDIR ENOEXEC ENOTSOCK ESPIPE
EADDRINUSE EDESTADDRREQ ELOOP ENOLCK ENOTSUP ESRCH
EADDRNOTAVAIL EDOM EMFILE ENOLINK ENOTTY ETIME
EAFNOSUPPORT EEXIST EMLINK ENOMEM ENXIO ETIMEDOUT
EAGAIN EFAULT EMSGSIZE ENOMSG EOPNOTSUPP ETXTBSY
EALREADY EFBIG ENAMETOOLONG ENOPROTOOPT EOVERFLOW EWOULDBLOCK
EBADF EHOSTUNREACH ENETDOWN ENOSPC EOWNERDEAD EXDEV
EBADMSG EIDRM ENETRESET ENOSR EPERM
EBUSY EILSEQ ENETUNREACH ENOSTR EPIPE
ECANCELED EINPROGRESS ENFILE ENOSYS EPROTO
ECHILD EINTR ENOBUFS ENOTCONN EPROTONOSUPPORT
ECONNABORTED EINVAL ENODATA ENOTDIR EPROTOTYPE
This list stays unchanged through all the following C++ standards,
including C++14.
The latest C standard, C11, still defines only 3 errno values: EDOM,
EILSEQ, and ERANGE.
So therefore I think we should have only those 3 values in the
__STRICT_ANSI__ portion, unless __cplusplus is defined and its value
is greater or equal to 201103L (which is what AFAICS GCC defines when
invoked as "g++ -std=c++11"), in which case we should have all of the
above Posix values available.
- Raw text -