public inbox for cygwin-patches@cygwin.com
 help / color / mirror / Atom feed
From: Christian Franke <Christian.Franke@t-online.de>
To: cygwin-patches@cygwin.com
Subject: [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from _sys_errlist[]
Date: Tue, 27 Feb 2024 13:18:39 +0100	[thread overview]
Message-ID: <ede12d4d-3401-5d68-cfd1-f3aafa6a3394@t-online.de> (raw)
In-Reply-To: <f0c37daf-4086-d5b9-9812-8b15916ad987@t-online.de>

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0002-Cygwin-remove-ENOSHARE-and-ECASECLASH-from-_sys_errl.patch --]
[-- Type: text/plain, Size: 1511 bytes --]

From f495fb0e7c2bd3a42f16f81af18c64ffaba9a860 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Tue, 27 Feb 2024 13:05:36 +0100
Subject: [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from
 _sys_errlist[]

These errno values are no longer used by Cygwin.  Also add a
static_assert check for _sys_errlist[] size.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
---
 winsup/cygwin/errno.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/winsup/cygwin/errno.cc b/winsup/cygwin/errno.cc
index 7d58e62ec..d8c057e51 100644
--- a/winsup/cygwin/errno.cc
+++ b/winsup/cygwin/errno.cc
@@ -167,8 +167,8 @@ const char *_sys_errlist[] =
 /* ESTALE 133 */	  "Stale NFS file handle",
 /* ENOTSUP 134 */	  "Not supported",
 /* ENOMEDIUM 135 */	  "No medium found",
-/* ENOSHARE 136 */	  "No such host or network path",
-/* ECASECLASH 137 */	  "Filename exists with different case",
+			  NULL, /* Was ENOSHARE 136, no longer used. */
+			  NULL, /* Was ECASECLASH 137, no longer used. */
 /* EILSEQ 138 */	  "Invalid or incomplete multibyte or wide character",
 /* EOVERFLOW 139 */	  "Value too large for defined data type",
 /* ECANCELED 140 */	  "Operation canceled",
@@ -177,6 +177,8 @@ const char *_sys_errlist[] =
 /* ESTRPIPE 143 */	  "Streams pipe error"
 };
 
+static_assert(143 + 1 == sizeof (_sys_errlist) / sizeof (_sys_errlist[0]));
+
 int NO_COPY_INIT _sys_nerr = sizeof (_sys_errlist) / sizeof (_sys_errlist[0]);
 };
 
-- 
2.43.0


  reply	other threads:[~2024-02-27 12:19 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 12:16 [PATCH 1/2] Cygwin: add compile warning if ENOSHARE or ECASECLASH is used Christian Franke
2024-02-27 12:18 ` Christian Franke [this message]
2024-02-27 14:59   ` [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from _sys_errlist[] Corinna Vinschen
2024-02-27 16:26     ` Christian Franke
2024-02-28  9:01       ` Corinna Vinschen

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=ede12d4d-3401-5d68-cfd1-f3aafa6a3394@t-online.de \
    --to=christian.franke@t-online.de \
    --cc=cygwin-patches@cygwin.com \
    /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: link
Be 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).