public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: net.cc: create own type host_errmap_t for host_errmap
@ 2022-08-04 10:56 Corinna Vinschen
0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-08-04 10:56 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=a8c1dd2ce08039e939dd1c57f02e5f1ed1593398
commit a8c1dd2ce08039e939dd1c57f02e5f1ed1593398
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Thu Aug 4 11:37:58 2022 +0200
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>
Diff:
---
winsup/cygwin/net.cc | 11 ++++++-----
1 file 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},
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-04 10:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-04 10:56 [newlib-cygwin] Cygwin: net.cc: create own type host_errmap_t for host_errmap Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).