Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions src/binutils-fix-path-corruption.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index ea0d1389cd1..187763eb444 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -189,11 +189,7 @@ _bfd_real_fopen (const char *filename, const char *modes)
}

#ifdef __MINGW32__
-#if !HAVE_DECL____LC_CODEPAGE_FUNC
- /* This prototype was added to locale.h in version 9.0 of MinGW-w64. */
- _CRTIMP unsigned int __cdecl ___lc_codepage_func (void);
-#endif
- const unsigned int cp = ___lc_codepage_func ();
+ const unsigned int cp = CP_ACP;
#else
const unsigned int cp = CP_UTF8;
#endif
18 changes: 18 additions & 0 deletions src/gdb-fix-iconv-cp65001.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
diff --git a/gdb/charset.c b/gdb/charset.c
index 5835fd40872..21d7ad03728 100644
--- a/gdb/charset.c
+++ b/gdb/charset.c
@@ -1029,8 +1029,11 @@ _initialize_charset (void)
/* "CP" + x<=5 digits + paranoia. */
static char w32_host_default_charset[16];

- snprintf (w32_host_default_charset, sizeof w32_host_default_charset,
- "CP%d", GetACP());
+ if (GetACP () == CP_UTF8)
+ strncpy (w32_host_default_charset, "UTF-8", sizeof w32_host_default_charset);
+ else
+ snprintf (w32_host_default_charset, sizeof w32_host_default_charset,
+ "CP%d", GetACP());
auto_host_charset_name = w32_host_default_charset;
auto_target_charset_name = auto_host_charset_name;
}
17 changes: 17 additions & 0 deletions src/gdb-fix-path-corruption.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
diff --git a/bfd/bfdio.c b/bfd/bfdio.c
index ea0d1389cd1..187763eb444 100644
--- a/bfd/bfdio.c
+++ b/bfd/bfdio.c
@@ -189,11 +189,7 @@ _bfd_real_fopen (const char *filename, const char *modes)
}

#ifdef __MINGW32__
-#if !HAVE_DECL____LC_CODEPAGE_FUNC
- /* This prototype was added to locale.h in version 9.0 of MinGW-w64. */
- _CRTIMP unsigned int __cdecl ___lc_codepage_func (void);
-#endif
- const unsigned int cp = ___lc_codepage_func ();
+ const unsigned int cp = CP_ACP;
#else
const unsigned int cp = CP_UTF8;
#endif