From 9b9fb0042f419da565bf66235270f369036d8c48 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Wed, 25 Jun 2014 09:59:38 +0000 Subject: [PATCH] * errno.cc (errmap): Handle Windows error codes ERROR_CANCELLED, ERROR_CONNECTION_REFUSED, ERROR_DEV_NOT_EXIST, ERROR_DS_GENERIC_ERROR, ERROR_NOT_ENOUGH_QUOTA, ERROR_SERVICE_REQUEST_TIMEOUT, ERROR_TIMEOUT, ERROR_UNEXP_NET_ERR. * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Drop explicit LDAP_TIMEOUT handling. --- winsup/cygwin/ChangeLog | 9 +++++++++ winsup/cygwin/errno.cc | 8 ++++++++ winsup/cygwin/ldap.cc | 2 -- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index b1e85a7af..4df0fb0b7 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,12 @@ +2014-06-25 Corinna Vinschen + + * errno.cc (errmap): Handle Windows error codes ERROR_CANCELLED, + ERROR_CONNECTION_REFUSED, ERROR_DEV_NOT_EXIST, ERROR_DS_GENERIC_ERROR, + ERROR_NOT_ENOUGH_QUOTA, ERROR_SERVICE_REQUEST_TIMEOUT, ERROR_TIMEOUT, + ERROR_UNEXP_NET_ERR. + * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Drop explicit LDAP_TIMEOUT + handling. + 2014-06-25 Corinna Vinschen * ldap.cc (cyg_ldap::map_ldaperr_to_errno): Explicitely map LDAP_TIMEOUT diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc index 2a5f711bd..9ea58ac44 100644 --- a/winsup/cygwin/errno.cc +++ b/winsup/cygwin/errno.cc @@ -59,17 +59,21 @@ static const struct X (BUSY, EBUSY), X (BUS_RESET, EIO), X (CALL_NOT_IMPLEMENTED, ENOSYS), + X (CANCELLED, EINTR), X (CANNOT_MAKE, EPERM), X (CHILD_NOT_COMPLETE, EBUSY), X (COMMITMENT_LIMIT, EAGAIN), + X (CONNECTION_REFUSED, ECONNREFUSED), X (CRC, EIO), X (DEVICE_DOOR_OPEN, EIO), X (DEVICE_IN_USE, EAGAIN), X (DEVICE_REQUIRES_CLEANING, EIO), + X (DEV_NOT_EXIST, ENOENT), X (DIRECTORY, ENOTDIR), X (DIR_NOT_EMPTY, ENOTEMPTY), X (DISK_CORRUPT, EIO), X (DISK_FULL, ENOSPC), + X (DS_GENERIC_ERROR, EIO), X (DUP_NAME, ENOTUNIQ), X (EAS_DIDNT_FIT, ENOSPC), X (EAS_NOT_SUPPORTED, ENOTSUP), @@ -115,6 +119,7 @@ static const struct X (NONPAGED_SYSTEM_RESOURCES, EAGAIN), X (NOT_CONNECTED, ENOLINK), X (NOT_ENOUGH_MEMORY, ENOMEM), + X (NOT_ENOUGH_QUOTA, EIO), X (NOT_OWNER, EPERM), X (NOT_READY, ENOMEDIUM), X (NOT_SAME_DEVICE, EXDEV), @@ -149,12 +154,15 @@ static const struct X (SETMARK_DETECTED, EIO), X (SHARING_BUFFER_EXCEEDED, ENOLCK), X (SHARING_VIOLATION, EBUSY), + X (SERVICE_REQUEST_TIMEOUT, EBUSY), X (SIGNAL_PENDING, EBUSY), X (SIGNAL_REFUSED, EIO), X (SXS_CANT_GEN_ACTCTX, ELIBBAD), X (THREAD_1_INACTIVE, EINVAL), + X (TIMEOUT, EBUSY), X (TOO_MANY_LINKS, EMLINK), X (TOO_MANY_OPEN_FILES, EMFILE), + X (UNEXP_NET_ERR, EIO), X (WAIT_NO_CHILDREN, ECHILD), X (WORKING_SET_QUOTA, EAGAIN), X (WRITE_PROTECT, EROFS), diff --git a/winsup/cygwin/ldap.cc b/winsup/cygwin/ldap.cc index 3964854bf..fa19c307e 100644 --- a/winsup/cygwin/ldap.cc +++ b/winsup/cygwin/ldap.cc @@ -89,8 +89,6 @@ cyg_ldap::map_ldaperr_to_errno (ULONG lerr) is SO wrong, especially considering that LDAP_MORE_RESULTS_TO_RETURN is mapped to ERROR_MORE_DATA as well :-P */ return ENMFILE; - case LDAP_TIMEOUT: - return EIO; default: break; } -- 2.43.5