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 1/2] Cygwin: add compile warning if ENOSHARE or ECASECLASH is used
Date: Tue, 27 Feb 2024 13:16:40 +0100	[thread overview]
Message-ID: <f0c37daf-4086-d5b9-9812-8b15916ad987@t-online.de> (raw)

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

A suggestion for a first (possibly polite) step to get rid of ENOSHARE 
or ECASECLASH. Would also work with clang.

The internally used ENMFILE is not included yet. In theory, it may be 
returned to outside world as it still appears in errmap[].

-- 
Regards,
Christian


[-- Attachment #2: 0001-Cygwin-add-compile-warning-if-ENOSHARE-or-ECASECLASH.patch --]
[-- Type: text/plain, Size: 1343 bytes --]

From f3ad1912a9c7fa4cd28ade5dc7c95134be759615 Mon Sep 17 00:00:00 2001
From: Christian Franke <christian.franke@t-online.de>
Date: Tue, 27 Feb 2024 13:03:08 +0100
Subject: [PATCH 1/2] Cygwin: add compile warning if ENOSHARE or ECASECLASH is
 used

These errno values are no longer used by Cygwin.

Signed-off-by: Christian Franke <christian.franke@t-online.de>
---
 newlib/libc/include/sys/errno.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/newlib/libc/include/sys/errno.h b/newlib/libc/include/sys/errno.h
index f1509712e..7199db0d2 100644
--- a/newlib/libc/include/sys/errno.h
+++ b/newlib/libc/include/sys/errno.h
@@ -176,9 +176,9 @@ extern __IMPORT char *program_invocation_short_name;
 #ifdef __LINUX_ERRNO_EXTENSIONS__
 #define ENOMEDIUM 135   /* No medium (in tape drive) */
 #endif
-#ifdef __CYGWIN__
-#define ENOSHARE 136    /* No such host or network path */
-#define ECASECLASH 137  /* Filename exists with different case */
+#if defined(__CYGWIN__) && !defined(__INSIDE_CYGWIN__)
+#define ENOSHARE (_Pragma("GCC warning \"'ENOSHARE' is no longer used by Cygwin\"") 136)
+#define ECASECLASH (_Pragma("GCC warning \"'ECASECLASH' is no longer used by Cygwin\"") 137)
 #endif
 #define EILSEQ 138		/* Illegal byte sequence */
 #define EOVERFLOW 139	/* Value too large for defined data type */
-- 
2.43.0


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

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-27 12:16 Christian Franke [this message]
2024-02-27 12:18 ` [PATCH 2/2] Cygwin: remove ENOSHARE and ECASECLASH from _sys_errlist[] Christian Franke
2024-02-27 14:59   ` 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=f0c37daf-4086-d5b9-9812-8b15916ad987@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).