[PATCH] newlib: libc: define _ctype for AArch64 Cygwin

Radek Barton <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <DB9PR83MB092319F1B78680A4832945309274A@DB9PR83MB0923.EURPRD83.prod.outlook.com>
Hello.

This change defines `_ctype_` symbol used in Cygwin for AArch64 the same way as for x86_64.

Radek

---
From 7532c751266a766cb3e289ebd7afb2d2c3d1ff3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
Date: Fri, 6 Jun 2025 16:17:27 +0200
Subject: [PATCH] newlib: libc: define _ctype for AArch64 Cygwin

---
 newlib/libc/ctype/ctype_.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c
index 32ce4f318..bf403d761 100644
--- a/newlib/libc/ctype/ctype_.c
+++ b/newlib/libc/ctype/ctype_.c
@@ -95,7 +95,7 @@ char _ctype_b[128 + 256] = {
 /* For backward compatibility */
 char __EXPORT *__ctype_ptr__ = DEFAULT_CTYPE_PTR;
 
-#    ifdef __x86_64__
+#    if defined(__x86_64__) || defined(__aarch64__)
 __asm__ ("					\n\
         .data					\n\
 	.globl  _ctype_				\n\
-- 
2.49.0.vfs.0.3


          
0001-newlib-libc-define-_ctype-for-AArch64-Cygwin.patch (application/octet-stream, 794 B)
From 7532c751266a766cb3e289ebd7afb2d2c3d1ff3d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Radek=20Barto=C5=88?= <[email protected]>
Date: Fri, 6 Jun 2025 16:17:27 +0200
Subject: [PATCH] newlib: libc: define _ctype for AArch64 Cygwin

---
 newlib/libc/ctype/ctype_.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/newlib/libc/ctype/ctype_.c b/newlib/libc/ctype/ctype_.c
index 32ce4f318..bf403d761 100644
--- a/newlib/libc/ctype/ctype_.c
+++ b/newlib/libc/ctype/ctype_.c
@@ -95,7 +95,7 @@ char _ctype_b[128 + 256] = {
 /* For backward compatibility */
 char __EXPORT *__ctype_ptr__ = DEFAULT_CTYPE_PTR;
 
-#    ifdef __x86_64__
+#    if defined(__x86_64__) || defined(__aarch64__)
 __asm__ ("					\n\
         .data					\n\
 	.globl  _ctype_				\n\
-- 
2.49.0.vfs.0.3
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.