public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE
@ 2022-08-03 14:06 Corinna Vinschen
  0 siblings, 0 replies; only message in thread
From: Corinna Vinschen @ 2022-08-03 14:06 UTC (permalink / raw)
  To: cygwin-cvs

https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=c874161ec5593e2698147c9d651cbd8f0fc23602

commit c874161ec5593e2698147c9d651cbd8f0fc23602
Author: Corinna Vinschen <corinna@vinschen.de>
Date:   Wed Aug 3 15:59:37 2022 +0200

    Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE
    
    Signed-off-by: Corinna Vinschen <corinna@vinschen.de>

Diff:
---
 winsup/cygwin/ctype.cc                 | 15 ---------------
 winsup/cygwin/include/cygwin/version.h |  3 ---
 2 files changed, 18 deletions(-)

diff --git a/winsup/cygwin/ctype.cc b/winsup/cygwin/ctype.cc
index 0fe243b2d..7bdc78edf 100644
--- a/winsup/cygwin/ctype.cc
+++ b/winsup/cygwin/ctype.cc
@@ -34,22 +34,12 @@ __set_ctype (struct __locale_t *loc, const char *charset)
 	idx = 0;
       else
 	++idx;
-      if (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE)
-	{
-	  memcpy (_ctype_b, __ctype_iso[idx], 128);
-	  memcpy (_ctype_b + 256, __ctype_iso[idx] + 256, 128);
-	}
       ctype_ptr = (char *) __ctype_iso[idx];
       break;
     case 'C':
       idx = __cp_index (charset + 2);
       if (idx < 0)
 	break;
-      if (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE)
-	{
-	  memcpy (_ctype_b, __ctype_cp[idx], 128);
-	  memcpy (_ctype_b + 256, __ctype_cp[idx] + 256, 128);
-	}
       ctype_ptr = (char *) __ctype_cp[idx];
       break;
     default:
@@ -57,11 +47,6 @@ __set_ctype (struct __locale_t *loc, const char *charset)
     }
   if (!ctype_ptr)
     {
-      if (CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE)
-	{
-	  memset (_ctype_b, 0, 128);
-	  memset (_ctype_b + 256, 0, 128);
-	}
       ctype_ptr = (char *) _ctype_b;
     }
   loc->ctype_ptr = ctype_ptr + 127;
diff --git a/winsup/cygwin/include/cygwin/version.h b/winsup/cygwin/include/cygwin/version.h
index 4aea37a79..c6ac40aae 100644
--- a/winsup/cygwin/include/cygwin/version.h
+++ b/winsup/cygwin/include/cygwin/version.h
@@ -34,9 +34,6 @@ details. */
 #define CYGWIN_VERSION_USER_API_VERSION_COMBINED \
   CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (user_data)
 
-#define CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE \
-  (CYGWIN_VERSION_USER_API_VERSION_COMBINED <= 209)
-
 #define CYGWIN_VERSION_USE_PSEUDO_RELOC_IN_DLL(u) \
   (CYGWIN_VERSION_PER_PROCESS_API_VERSION_COMBINED (u) >= 227)


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-08-03 14:06 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-03 14:06 [newlib-cygwin] Cygwin: drop macro and code for CYGWIN_VERSION_CHECK_FOR_OLD_CTYPE 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).