https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=5f6f120984969e7f0e294b77a8851b2a0b2642ab

commit 5f6f120984969e7f0e294b77a8851b2a0b2642ab
Author:     Mark Geisert <[email protected]>
AuthorDate: Thu Mar 5 02:52:33 2026 -0800
Commit:     Corinna Vinschen <[email protected]>
CommitDate: Wed Mar 11 15:59:27 2026 +0100

    Cygwin: Change mappings of Windows ERROR*QUOTA*
    
    While testing the new rlimit implementation, it was noticed fork()
    returns an EIO error on hitting the process count limit.  Per POSIX,
    the error should be EAGAIN.  This patch makes the change.
    
    Along the way it was noticed Windows ERROR_DISK_QUOTA_EXCEEDED was not
    being mapped to any POSIX error.  This patch changes the mapping to EFBIG.
    
    Addresses: https://cygwin.com/pipermail/cygwin-patches/2026q1/014707.html
    Signed-off-by: Mark Geisert <[email protected]>
    Fixes: c2f6c0415501 (Cygwin: errmap[]: update comments using current 
winerror.h)

Diff:
---
 winsup/cygwin/local_includes/errmap.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/local_includes/errmap.h 
b/winsup/cygwin/local_includes/errmap.h
index 354968f86dac..bbe4b6a35444 100644
--- a/winsup/cygwin/local_includes/errmap.h
+++ b/winsup/cygwin/local_includes/errmap.h
@@ -1301,7 +1301,7 @@ constexpr uint8_t errmap[] =
   0,                   /* 1292: ERROR_IMPLEMENTATION_LIMIT */
   0,                   /* 1293: ERROR_PROCESS_IS_PROTECTED */
   0,                   /* 1294: ERROR_SERVICE_NOTIFY_CLIENT_LAGGING */
-  0,                   /* 1295: ERROR_DISK_QUOTA_EXCEEDED */
+  EFBIG,               /* 1295: ERROR_DISK_QUOTA_EXCEEDED */
   0,                   /* 1296: ERROR_CONTENT_BLOCKED */
   0,                   /* 1297: ERROR_INCOMPATIBLE_SERVICE_PRIVILEGE */
   0,                   /* 1298: ERROR_APP_HANG */
@@ -1822,7 +1822,7 @@ constexpr uint8_t errmap[] =
   0,                   /* 1813: ERROR_RESOURCE_TYPE_NOT_FOUND */
   0,                   /* 1814: ERROR_RESOURCE_NAME_NOT_FOUND */
   0,                   /* 1815: ERROR_RESOURCE_LANG_NOT_FOUND */
-  EIO,                 /* 1816: ERROR_NOT_ENOUGH_QUOTA */
+  EAGAIN,              /* 1816: ERROR_NOT_ENOUGH_QUOTA */
   0,                   /* 1817 */
   0,                   /* 1818 */
   0,                   /* 1819 */

Reply via email to