int
ACE::out_of_handles (int error)
{
// EMFILE is common to all platforms.
if (error == EMFILE ||
#if defined (ACE_WIN32)
// On Win32, we need to check for ENOBUFS also.
error == ENOBUFS ||
#elif defined (HPUX)
// On HPUX, we need to check for EADDRNOTAVAIL also.
error == EADDRNOTAVAIL ||
#elif defined (linux)
// On linux, we need to check for ENOENT also.
error == ENOENT ||
// For RedHat5.2, need to check for EINVAL too.
error == EINVAL ||
// Without threads check for EOPNOTSUPP
error == EOPNOTSUPP ||
#elif defined (sun)
// On sun, we need to check for ENOSR also.
error == ENOSR ||
// Without threads check for ENOTSUP
error == ENOTSUP ||
#elif defined (__FreeBSD__)
// On FreeBSD we need to check for EOPNOTSUPP (LinuxThreads) or
// ENOSYS (libc_r threads) also.
error == EOPNOTSUPP ||
error == ENOSYS ||
#elif defined (__OpenBSD__)
// OpenBSD appears to return EBADF.
error == EBADF ||
#elif defined (__sgi) // irix
error == ENOTSUP ||
#elif defined (DIGITAL_UNIX) // osf1
error == ENOTSUP ||
#endif /* ACE_WIN32 */
error == ENFILE)
return 1;
else
return 0;
}