* [binutils-gdb] bfd: Define ___lc_codepage_func prototype for older MinGW-w64
@ 2022-08-16 17:09 Luis Machado
0 siblings, 0 replies; only message in thread
From: Luis Machado @ 2022-08-16 17:09 UTC (permalink / raw)
To: bfd-cvs
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=4ae982e83ced08a78af98f738878e28e4066d72b
commit 4ae982e83ced08a78af98f738878e28e4066d72b
Author: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Date: Tue Aug 16 18:04:21 2022 +0100
bfd: Define ___lc_codepage_func prototype for older MinGW-w64
In commit 68e80d96a84282d547f3b3c1234c99009521630c, the usage of
___lc_codepage_func was introduced to determine the current encoding.
Prior to version 9.0 of MinGW-w64, the function prototype for
___lc_codepage_func was missing and trying to build BFD caused the
following error:
error: implicit declaration of function ‘___lc_codepage_func’
This changeset adds a conditonal definition of
___lc_codepage_func to allow a sucessful build with MinGW-w64.
Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Diff:
---
bfd/bfdio.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index a7c7d5bd363..571f12b625a 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -31,6 +31,11 @@
#include <locale.h>
#endif
+#if defined(__MINGW64_VERSION_MAJOR) && __MINGW64_VERSION_MAJOR < 9
+/* This prototype was added to locale.h in version 9.0 of MinGW-w64. */
+_CRTIMP unsigned int __cdecl ___lc_codepage_func(void);
+#endif
+
#ifndef S_IXUSR
#define S_IXUSR 0100 /* Execute by owner. */
#endif
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-16 17:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-16 17:09 [binutils-gdb] bfd: Define ___lc_codepage_func prototype for older MinGW-w64 Luis Machado
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).