Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2022-08-04 12:37:58 +0300
committerCorinna Vinschen <corinna@vinschen.de>2022-08-04 12:37:58 +0300
commita8c1dd2ce08039e939dd1c57f02e5f1ed1593398 (patch)
treea00346b57b32abeaf0c32d8f61e6f883a50f2995 /winsup/cygwin/net.cc
parent8053ccd44bf3bae3092ca52c4cb5e41f19e813a6 (diff)
Cygwin: net.cc: create own type host_errmap_t for host_errmap
This decouples host_errmap from the errmap_t definition which is about to be changed in a followup patch. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'winsup/cygwin/net.cc')
-rw-r--r--winsup/cygwin/net.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/winsup/cygwin/net.cc b/winsup/cygwin/net.cc
index 087248439..83ea37f6e 100644
--- a/winsup/cygwin/net.cc
+++ b/winsup/cygwin/net.cc
@@ -205,11 +205,12 @@ __set_winsock_errno (const char *fn, int ln)
syscall_printf ("%s:%d - winsock error %u -> errno %d", fn, ln, werr, err);
}
-/*
- * Since the member `s' isn't used for debug output we can use it
- * for the error text returned by herror and hstrerror.
- */
-static const errmap_t host_errmap[] = {
+static const struct host_errmap_t
+{
+ DWORD w; /* windows version of error */
+ const char *s; /* error text returned by herror and hstrerror */
+ int e; /* errno version of error */
+} host_errmap[] = {
{WSAHOST_NOT_FOUND, "Unknown host", HOST_NOT_FOUND},
{WSATRY_AGAIN, "Host name lookup failure", TRY_AGAIN},
{WSANO_RECOVERY, "Unknown server error", NO_RECOVERY},