public inbox for cygwin-cvs@sourceware.org help / color / mirror / Atom feed
From: Corinna Vinschen <corinna@sourceware.org> To: cygwin-cvs@sourceware.org Subject: [newlib-cygwin] Cygwin: net.cc: create own type host_errmap_t for host_errmap Date: Thu, 4 Aug 2022 10:56:32 +0000 (GMT) [thread overview] Message-ID: <20220804105632.2A5FD385740F@sourceware.org> (raw) 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},
reply other threads:[~2022-08-04 10:56 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220804105632.2A5FD385740F@sourceware.org \ --to=corinna@sourceware.org \ --cc=cygwin-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).