From 1ca1458313bcf2d13cf47c03398ad617c5298e58 Mon Sep 17 00:00:00 2001
From: LIU Hao <[email protected]>
Date: Mon, 6 Jul 2026 21:50:53 +0800
Subject: [PATCH] crt: Implement `_ispunct_l()` for MSVCRT

It is not exported from any MSVCRT.DLL; only from MSVCR80.DLL and later, and
also from UCRTBASE.DLL.

This closes https://github.com/mingw-w64/mingw-w64/issues/178.

Signed-off-by: LIU Hao <[email protected]>
---
 mingw-w64-crt/Makefile.am        |  1 +
 mingw-w64-crt/ctype/_ispunct_l.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 mingw-w64-crt/ctype/_ispunct_l.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index b651dce59..5ea14f8fb 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -342,6 +342,7 @@ src_msvcrt=\
   ctype/__iswcsymf.c \
   ctype/_isblank_l.c \
   ctype/_iswblank_l.c \
+  ctype/_ispunct_l.c \
   ctype/isblank.c \
   ctype/isprint.c \
   ctype/iswblank.c \
diff --git a/mingw-w64-crt/ctype/_ispunct_l.c b/mingw-w64-crt/ctype/_ispunct_l.c
new file mode 100644
index 000000000..3dcd370b2
--- /dev/null
+++ b/mingw-w64-crt/ctype/_ispunct_l.c
@@ -0,0 +1,14 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#define _CTYPE_DISABLE_MACROS
+#include <ctype.h>
+
+int __cdecl _ispunct_l(int _C, _locale_t _Locale)
+{
+  return _isctype_l(_C, _PUNCT, _Locale);
+}
+int (__cdecl *__MINGW_IMP_SYMBOL(_ispunct_l))(int, _locale_t) = _ispunct_l;
--
2.55.0

From 1ca1458313bcf2d13cf47c03398ad617c5298e58 Mon Sep 17 00:00:00 2001
From: LIU Hao <[email protected]>
Date: Mon, 6 Jul 2026 21:50:53 +0800
Subject: [PATCH] crt: Implement `_ispunct_l()` for MSVCRT

It is not exported from any MSVCRT.DLL; only from MSVCR80.DLL and later, and
also from UCRTBASE.DLL.

This closes https://github.com/mingw-w64/mingw-w64/issues/178.

Signed-off-by: LIU Hao <[email protected]>
---
 mingw-w64-crt/Makefile.am        |  1 +
 mingw-w64-crt/ctype/_ispunct_l.c | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 mingw-w64-crt/ctype/_ispunct_l.c

diff --git a/mingw-w64-crt/Makefile.am b/mingw-w64-crt/Makefile.am
index b651dce59..5ea14f8fb 100644
--- a/mingw-w64-crt/Makefile.am
+++ b/mingw-w64-crt/Makefile.am
@@ -342,6 +342,7 @@ src_msvcrt=\
   ctype/__iswcsymf.c \
   ctype/_isblank_l.c \
   ctype/_iswblank_l.c \
+  ctype/_ispunct_l.c \
   ctype/isblank.c \
   ctype/isprint.c \
   ctype/iswblank.c \
diff --git a/mingw-w64-crt/ctype/_ispunct_l.c b/mingw-w64-crt/ctype/_ispunct_l.c
new file mode 100644
index 000000000..3dcd370b2
--- /dev/null
+++ b/mingw-w64-crt/ctype/_ispunct_l.c
@@ -0,0 +1,14 @@
+/**
+ * This file has no copyright assigned and is placed in the Public Domain.
+ * This file is part of the mingw-w64 runtime package.
+ * No warranty is given; refer to the file DISCLAIMER.PD within this package.
+ */
+
+#define _CTYPE_DISABLE_MACROS
+#include <ctype.h>
+
+int __cdecl _ispunct_l(int _C, _locale_t _Locale)
+{
+  return _isctype_l(_C, _PUNCT, _Locale);
+}
+int (__cdecl *__MINGW_IMP_SYMBOL(_ispunct_l))(int, _locale_t) = _ispunct_l;
-- 
2.55.0

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to