Created
January 24, 2014 15:41
-
-
Save martell/8599741 to your computer and use it in GitHub Desktop.
lc fix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
From 40aef7205ffbd6bfc629f6e2a39349fbb67c5aee Mon Sep 17 00:00:00 2001 | |
From: ktietz70 <ktietz70@4407c894-4637-0410-b4f5-ada5f102cad1> | |
Date: Sun, 25 Aug 2013 19:17:54 +0000 | |
Subject: [PATCH] Fix lc_codepage_func isssue | |
git-svn-id: svn://svn.code.sf.net/p/mingw-w64/code/trunk@6134 4407c894-4637-0410-b4f5-ada5f102cad1 | |
--- | |
mingw-w64-crt/misc/lc_locale_func.c | 7 +++++++ | |
mingw-w64-crt/misc/mb_wc_common.h | 2 +- | |
2 files changed, 8 insertions(+), 1 deletion(-) | |
diff --git a/mingw-w64-crt/misc/lc_locale_func.c b/mingw-w64-crt/misc/lc_locale_func.c | |
index 3aebcdc..196207f 100644 | |
--- a/mingw-w64-crt/misc/lc_locale_func.c | |
+++ b/mingw-w64-crt/misc/lc_locale_func.c | |
@@ -1,8 +1,10 @@ | |
#define __lc_codepage __dummy_lc_codepage | |
+#define ___lc_codepage_func __dummy____lc_codepage_func | |
#include <windows.h> | |
#include <locale.h> | |
#include <msvcrt.h> | |
+#undef ___lc_codepage_func | |
#include "mb_wc_common.h" | |
static unsigned int *msvcrt__lc_codepage; | |
@@ -21,6 +23,11 @@ static unsigned int __cdecl setlocale_codepage_hack(void) | |
static unsigned int __cdecl init_codepage_func(void); | |
unsigned int (__cdecl *__MINGW_IMP_SYMBOL(___lc_codepage_func))(void) = init_codepage_func; | |
+unsigned int __cdecl ___lc_codepage_func (void) | |
+{ | |
+ return __MINGW_IMP_SYMBOL(___lc_codepage_func) (); | |
+} | |
+ | |
static unsigned int __cdecl init_codepage_func(void) | |
{ | |
HMODULE msvcrt = __mingw_get_msvcrt_handle(); | |
diff --git a/mingw-w64-crt/misc/mb_wc_common.h b/mingw-w64-crt/misc/mb_wc_common.h | |
index 5a40013..c640fb7 100644 | |
--- a/mingw-w64-crt/misc/mb_wc_common.h | |
+++ b/mingw-w64-crt/misc/mb_wc_common.h | |
@@ -6,4 +6,4 @@ | |
#include <_mingw.h> | |
-_CRTIMP unsigned int __cdecl ___lc_codepage_func(void); | |
+unsigned int __cdecl ___lc_codepage_func(void); | |
-- | |
1.8.3.1 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment