From 6c64ba9851505ceed2b66aa403d3aa70b3bac264 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 19 Dec 2011 05:16:30 +0000 Subject: [PATCH] Remove ENOENT from the list of WSAE* defines we override. ENOENT wasn't being used by other code in a networking context. I need to be able to detect a real ENOENT from a file deletion. --- nbase/nbase_winunix.h | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/nbase/nbase_winunix.h b/nbase/nbase_winunix.h index 24d00f7f3..36d335d15 100644 --- a/nbase/nbase_winunix.h +++ b/nbase/nbase_winunix.h @@ -187,8 +187,6 @@ #undef EINTR #define EINTR WSAEINTR /* Interrupted system call */ #define ENOBUFS WSAENOBUFS /* No buffer space available */ -#undef ENOENT -#define ENOENT WSAENOENT /* No such file or directory */ #define EMSGSIZE WSAEMSGSIZE /* Message too long */ #undef ENOMEM #define ENOMEM WSAENOBUFS @@ -197,6 +195,13 @@ #undef EIO #define EIO WSASYSCALLFAILURE +/* +This is not used by our network code, and causes problems in programs using +Nbase that legitimately use ENOENT for file operations. +#undef ENOENT +#define ENOENT WSAENOENT +*/ + #define close(x) closesocket(x) typedef unsigned short u_short_t;