* Windows charset change
@ 2010-03-11 18:18 Daniel Jacobowitz
2010-03-11 18:21 ` Tom Tromey
2010-03-11 19:51 ` Eli Zaretskii
0 siblings, 2 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2010-03-11 18:18 UTC (permalink / raw)
To: gdb-patches; +Cc: Corinna Vinschen, Tom Tromey
My mingw builds have:
charset.c: In function '_initialize_charset':
charset.c:935: error: type defaults to 'int' in declaration of 'w32_host_default_charset'
charset.c:938: error: implicit declaration of function 'GetACP'
charset.c:938: error: passing argument 1 of 'snprintf' from incompatible pointer type
charset.c:939: error: assignment from incompatible pointer type
The error on line 935 is straightforward:
static w32_host_default_charset[16]; /* "CP" + x<=5 digits + paranoia. */
This is supposed to be char, I presume?
The implicit declaration of GetACP is harder; I don't know what should
have been included to declare it. Looks like windows.h or winnls.h.
--
Daniel Jacobowitz
CodeSourcery
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Windows charset change
2010-03-11 18:18 Windows charset change Daniel Jacobowitz
@ 2010-03-11 18:21 ` Tom Tromey
2010-03-11 19:51 ` Eli Zaretskii
1 sibling, 0 replies; 4+ messages in thread
From: Tom Tromey @ 2010-03-11 18:21 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, Corinna Vinschen
>>>>> "Daniel" == Daniel Jacobowitz <dan@codesourcery.com> writes:
Daniel> This is supposed to be char, I presume?
Yes, sorry :-(
Tom
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Windows charset change
2010-03-11 18:18 Windows charset change Daniel Jacobowitz
2010-03-11 18:21 ` Tom Tromey
@ 2010-03-11 19:51 ` Eli Zaretskii
2010-03-14 22:40 ` Daniel Jacobowitz
1 sibling, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2010-03-11 19:51 UTC (permalink / raw)
To: Daniel Jacobowitz; +Cc: gdb-patches, vinschen, tromey
> Date: Thu, 11 Mar 2010 13:18:01 -0500
> From: Daniel Jacobowitz <dan@codesourcery.com>
> Cc: Corinna Vinschen <vinschen@redhat.com>, Tom Tromey <tromey@redhat.com>
>
> The implicit declaration of GetACP is harder; I don't know what should
> have been included to declare it. Looks like windows.h or winnls.h.
It's windows.h, according to MSDN.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Windows charset change
2010-03-11 19:51 ` Eli Zaretskii
@ 2010-03-14 22:40 ` Daniel Jacobowitz
0 siblings, 0 replies; 4+ messages in thread
From: Daniel Jacobowitz @ 2010-03-14 22:40 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: gdb-patches, vinschen, tromey
On Thu, Mar 11, 2010 at 09:50:43PM +0200, Eli Zaretskii wrote:
> > Date: Thu, 11 Mar 2010 13:18:01 -0500
> > From: Daniel Jacobowitz <dan@codesourcery.com>
> > Cc: Corinna Vinschen <vinschen@redhat.com>, Tom Tromey <tromey@redhat.com>
> >
> > The implicit declaration of GetACP is harder; I don't know what should
> > have been included to declare it. Looks like windows.h or winnls.h.
>
> It's windows.h, according to MSDN.
Thanks. I've checked this in.
--
Daniel Jacobowitz
CodeSourcery
2010-03-14 Daniel Jacobowitz <dan@codesourcery.com>
* charset.c [USE_WIN32API]: Include <windows.h>.
(_initialize_charset): Correct type of w32_host_default_charset.
Index: gdb/charset.c
===================================================================
RCS file: /cvs/src/src/gdb/charset.c,v
retrieving revision 1.29
diff -u -p -r1.29 charset.c
--- gdb/charset.c 5 Mar 2010 20:18:11 -0000 1.29
+++ gdb/charset.c 14 Mar 2010 22:36:05 -0000
@@ -33,6 +33,9 @@
#include "gdb_string.h"
#include <ctype.h>
+#ifdef USE_WIN32API
+#include <windows.h>
+#endif
\f
/* How GDB's character set support works
@@ -932,7 +935,7 @@ _initialize_charset (void)
auto_target_charset_name = auto_host_charset_name;
#elif defined (USE_WIN32API)
{
- static w32_host_default_charset[16]; /* "CP" + x<=5 digits + paranoia. */
+ static char w32_host_default_charset[16]; /* "CP" + x<=5 digits + paranoia. */
snprintf (w32_host_default_charset, sizeof w32_host_default_charset,
"CP%d", GetACP());
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-03-14 22:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 18:18 Windows charset change Daniel Jacobowitz
2010-03-11 18:21 ` Tom Tromey
2010-03-11 19:51 ` Eli Zaretskii
2010-03-14 22:40 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox