[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 2/2] Define stricoll as _stricoll on mingw
From: |
Khem Raj |
Subject: |
[PATCH 2/2] Define stricoll as _stricoll on mingw |
Date: |
Wed, 29 May 2024 21:30:39 -0700 |
* src/system.h: Define stricoll as _stricoll on mingw.
---
src/system.h | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/src/system.h b/src/system.h
index b37893f..4c7a318 100644
--- a/src/system.h
+++ b/src/system.h
@@ -63,6 +63,16 @@
#include <inttypes.h>
#include <string.h>
+/* stricoll is not provided by any headers on windows/mingw
+ only _stricoll is provided, the function is however aliased
+ to provide stricoll in runtime libraries, the configure check
+ to detect stricoll defines the prototype in generated test
+ itself and thus test passes, however compiling fails with
+ GCC-14 which enables implicit-function-declaration as error */
+#if defined _WIN32 && ! defined __CYGWIN__
+#define stricoll _stricoll
+#endif
+
#if ! HAVE_STRCASECOLL
# if HAVE_STRICOLL || defined stricoll
# define strcasecoll(a, b) stricoll (a, b)
--
2.45.1