[mingw-crt/f18] Fix Windows 2000 compatibility issue regarding missing ___lc_codepage_func symbol

Erik van Pienbroek epienbro at fedoraproject.org
Sun Aug 25 22:31:40 UTC 2013


commit 8ccee8b3e9736dd18810b5d5384afa57080ee95a
Author: Erik van Pienbroek <epienbro at fedoraproject.org>
Date:   Mon Aug 26 00:31:27 2013 +0200

    Fix Windows 2000 compatibility issue regarding missing ___lc_codepage_func symbol

 0001-Fix-lc_codepage_func-isssue.patch |   51 ++++++++++++++++++++++++++++++++
 mingw-crt.spec                         |   10 +++++-
 2 files changed, 60 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-lc_codepage_func-isssue.patch b/0001-Fix-lc_codepage_func-isssue.patch
new file mode 100644
index 0000000..2260e15
--- /dev/null
+++ b/0001-Fix-lc_codepage_func-isssue.patch
@@ -0,0 +1,51 @@
+From 40aef7205ffbd6bfc629f6e2a39349fbb67c5aee Mon Sep 17 00:00:00 2001
+From: ktietz70 <ktietz70 at 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
+
diff --git a/mingw-crt.spec b/mingw-crt.spec
index 611b207..c1afd27 100644
--- a/mingw-crt.spec
+++ b/mingw-crt.spec
@@ -6,7 +6,7 @@
 
 Name:           mingw-crt
 Version:        2.0.999
-Release:        0.31.%{branch}.r%{snapshot_rev}.%{snapshot_date}%{?dist}
+Release:        0.32.%{branch}.r%{snapshot_rev}.%{snapshot_date}%{?dist}
 Summary:        MinGW Windows cross-compiler runtime
 
 License:        Public Domain and ZPLv2.1
@@ -27,6 +27,10 @@ Source0:        http://downloads.sourceforge.net/mingw-w64/mingw-w64-v%{version}
 # Upstream commit r6044
 Patch0:         mingw-w64-r6044-prevent-dep-on-libgcc-sljl-dll.patch
 
+# Fix Windows 2000 compatibility issue regarding missing ___lc_codepage_func symbol
+# Upstream commit r6134
+Patch1:         0001-Fix-lc_codepage_func-isssue.patch
+
 BuildArch:      noarch
 
 BuildRequires:  mingw32-filesystem >= 95
@@ -75,6 +79,7 @@ unzip %{S:0}
 %endif
 
 %patch0 -p1 -b .libgcc
+%patch1 -p1 -b .win2k
 
 
 %build
@@ -105,6 +110,9 @@ rm -rf $RPM_BUILD_ROOT%{mingw64_includedir}/*.c
 
 
 %changelog
+* Sun Aug 25 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.0.999-0.32.trunk.r5969.20130721
+- Fix Windows 2000 compatibility issue regarding missing ___lc_codepage_func symbol
+
 * Sat Aug 10 2013 Erik van Pienbroek <epienbro at fedoraproject.org> - 2.0.999-0.31.trunk.r5969.20130721
 - Prevent dependency on libgcc_s_sjlj-1.dll when it isn't needed (upstream commit r6044)
 


More information about the scm-commits mailing list