Bug#626437: mingw-w64-dev: produced binaries don't work on win2000

May 11th, 2011 - 08:00 pm ET by Adam Borowski | Report spam
Package: mingw-w64-dev
Version: 1.0+20101003-1
Severity: normal
Tags: patch

Executables produced by recent mingw fail on start on win2k and XP sp0
with a message "___lc_codepage_func in DLL msvcrt.dll" .

This regression is introduced in SVN revision 2285:

Author: jon_y
Date: Sun May 2 10:32:30 2010 +0000

use ___lc_codepage_func instead of __lc_codepage to get codepage.


diff --git a/mingw-w64-crt/misc/mb_wc_common.h b/mingw-w64-crt/misc/mb_wc_common.h
index af633b8..50794ea 100644
a/mingw-w64-crt/misc/mb_wc_common.h
+++ b/mingw-w64-crt/misc/mb_wc_common.h
@@ -4,11 +4,11 @@
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
*/

-#undef __lc_codepage
-__declspec(dllimport) extern unsigned int __lc_codepage;
+#include <_mingw.h>
+_CRTIMP unsigned int ___lc_codepage_func(void);

static inline
unsigned int get_codepage (void)
{
- return __lc_codepage;
+ return ___lc_codepage_func();
}


This change is trivially revertable, and if you do so, executables start to
work again. It would be better to use one of proper win32 locale handling
functions rather than undocumented __lc_codepage or __lc_codepage_func(),
but that's better decided by upstream; simple reversion of this patch is
more conservative.

I tried reporting this on upstream's bug tracker, but they use SourceForge
which is as usually broken, throwing an error whenever I try to log in.


Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable'), (150, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38-2-amd64 (SMP w/6 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash




To UNSUBSCRIBE, email to debian-bugs-dist-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
email Follow the discussionReplies 1 replyReplies Make a reply

Similar topics

Replies

#1 Stephen Kitt
May 12th, 2011 - 01:20 am ET | Report spam
Hi Adam,

On Thu, May 12, 2011 at 01:47:39AM +0200, Adam Borowski wrote:
This change is trivially revertable, and if you do so, executables start to
work again. It would be better to use one of proper win32 locale handling
functions rather than undocumented __lc_codepage or __lc_codepage_func(),
but that's better decided by upstream; simple reversion of this patch is
more conservative.



Thanks for the info!

I tried reporting this on upstream's bug tracker, but they use SourceForge
which is as usually broken, throwing an error whenever I try to log in.



I've forwarded this bug to
https://sourceforge.net/tracker/?fu...p;group_id 2880&atid˜3354

If you don't mind I'll wait a few days for a reaction upstream before
reverting this in the Debian package (if no better solution comes
up).

Regards,

Stephen



To UNSUBSCRIBE, email to
with a subject of "unsubscribe". Trouble? Contact
email Follow the discussion Replies Reply to this message
Help Create a new topicReplies Make a reply
Search Make your own search