On Sat, 28 Jun 2003 09:46:35 +0200, Sir Gerald Pfeifer scribed thus:
The following patch to dlls/commdlg/printdlg.c
revision 1.66 date: 2003/06/27 22:21:06; author: julliard; state: Exp; lines: +4 -7 Mike Hearn m.hearn@signal.qinetiq.com Store PrintStructures in a window property instead of extra window bytes.
cause two new warnings
printdlg.c:2056: warning: passing arg 2 of `GetPropW' from incompatible pointer type printdlg.c:2061: warning: passing arg 2 of `SetPropW' from incompatible pointer type
Odd, I don't remember getting those. Perhaps I just didn't notice. In future I'll try and remember to compile with -Werror before submitting.
In this case I think it's mostly academic as the string doesn't have any non ANSI characters in it, but I think another solution might be to put an L before the string, so it becomes:
SetPropW(hDlg, L"__WINE_WHATEVER"....)
On Sat, Jun 28, 2003 at 04:30:13PM +0100, Mike Hearn wrote:
On Sat, 28 Jun 2003 09:46:35 +0200, Sir Gerald Pfeifer scribed thus:
The following patch to dlls/commdlg/printdlg.c
revision 1.66 date: 2003/06/27 22:21:06; author: julliard; state: Exp; lines: +4 -7 Mike Hearn m.hearn@signal.qinetiq.com Store PrintStructures in a window property instead of extra window bytes.
cause two new warnings
printdlg.c:2056: warning: passing arg 2 of `GetPropW' from incompatible pointer type printdlg.c:2061: warning: passing arg 2 of `SetPropW' from incompatible pointer type
Odd, I don't remember getting those. Perhaps I just didn't notice. In future I'll try and remember to compile with -Werror before submitting.
In this case I think it's mostly academic as the string doesn't have any non ANSI characters in it, but I think another solution might be to put an L before the string, so it becomes:
SetPropW(hDlg, L"__WINE_WHATEVER"....)
No, L"x" is not guaranteed to do the things you think it does.
(It will use 4 byte characters, depending on how gcc is configured or if you use -fwchar-short or so.)
Ciao, Marcus
Le sam 28/06/2003 à 16:18, Marcus Meissner a écrit :
On Sat, Jun 28, 2003 at 04:30:13PM +0100, Mike Hearn wrote:
On Sat, 28 Jun 2003 09:46:35 +0200, Sir Gerald Pfeifer scribed thus:
The following patch to dlls/commdlg/printdlg.c
revision 1.66 date: 2003/06/27 22:21:06; author: julliard; state: Exp; lines: +4 -7 Mike Hearn m.hearn@signal.qinetiq.com Store PrintStructures in a window property instead of extra window bytes.
cause two new warnings
printdlg.c:2056: warning: passing arg 2 of `GetPropW' from incompatible pointer type printdlg.c:2061: warning: passing arg 2 of `SetPropW' from incompatible pointer type
Odd, I don't remember getting those. Perhaps I just didn't notice. In future I'll try and remember to compile with -Werror before submitting.
In this case I think it's mostly academic as the string doesn't have any non ANSI characters in it, but I think another solution might be to put an L before the string, so it becomes:
SetPropW(hDlg, L"__WINE_WHATEVER"....)
No, L"x" is not guaranteed to do the things you think it does.
(It will use 4 byte characters, depending on how gcc is configured or if you use -fwchar-short or so.)
Doesn't Wine's comfigure complain if gcc doesn't understand -fshort-wchar? (It seems it doesn't, but I'm sure it did in the past...)
Actually, since I can't find that option passed to gcc anymore, how does Wine gets its binary compatibility with native apps regarding this issue?
I'm asking because I saw a couple L"_text" while grepping for answering Mike...
Vincent
No, L"x" is not guaranteed to do the things you think it does.
(It will use 4 byte characters, depending on how gcc is configured or if you use -fwchar-short or so.)
Doesn't Wine's comfigure complain if gcc doesn't understand -fshort-wchar? (It seems it doesn't, but I'm sure it did in the past...)
I am pretty sure it never did.
Actually, since I can't find that option passed to gcc anymore, how does Wine gets its binary compatibility with native apps regarding this issue?
Hmm? The native apps when compiled use the option -fshort-wchar, see : tools/winegcc.c: gcc_argv[i++] = "-fshort-wchar";
I'm asking because I saw a couple L"_text" while grepping for answering Mike...
There ain't:
./dlls/kernel/messages/winerr_enu.mc.rc: L"Success\n\x0000\x0000", is handled by wmc
./dlls/shlwapi/ordinal.c: lstrlenW(L"{D0FCA420-D3F5-11CF-B211-00AA004AE837 }"); ./dlls/shlwapi/ordinal.c: StrCpyW(a6, L"{D0FCA420-D3F5-11CF-B211-00AA004A E837}"); #if 0'ed out.
./include/wincrypt.h (and one other .h file) use L"" protected by MSVC checks.
Ciao, Marcus
Le sam 28/06/2003 à 17:27, Marcus Meissner a écrit :
Actually, since I can't find that option passed to gcc anymore, how does Wine gets its binary compatibility with native apps regarding this issue?
Hmm? The native apps when compiled use the option -fshort-wchar, see : tools/winegcc.c: gcc_argv[i++] = "-fshort-wchar";
I was talking about a random foo.exe in PE format. How does Wine understands the WSTR from it if it's not itself compiled with -fshort-wchar?
I'm asking because I saw a couple L"_text" while grepping for answering Mike...
There ain't:
./dlls/kernel/messages/winerr_enu.mc.rc: L"Success\n\x0000\x0000", is handled by wmc
./dlls/shlwapi/ordinal.c: lstrlenW(L"{D0FCA420-D3F5-11CF-B211-00AA004AE837 }"); ./dlls/shlwapi/ordinal.c: StrCpyW(a6, L"{D0FCA420-D3F5-11CF-B211-00AA004A E837}"); #if 0'ed out.
./include/wincrypt.h (and one other .h file) use L"" protected by MSVC checks.
My fault, just grepped and didn't checked the context for that StrCpyW.
Thanks Marcus.
Vincent
On Sat, Jun 28, 2003 at 05:56:23PM -0400, Vincent Béron wrote:
Le sam 28/06/2003 à 17:27, Marcus Meissner a écrit :
Actually, since I can't find that option passed to gcc anymore, how does Wine gets its binary compatibility with native apps regarding this issue?
Hmm? The native apps when compiled use the option -fshort-wchar, see : tools/winegcc.c: gcc_argv[i++] = "-fshort-wchar";
I was talking about a random foo.exe in PE format. How does Wine understands the WSTR from it if it's not itself compiled with -fshort-wchar?
It must be compiled with -fshort-wchar. Thats why winegcc sets it by default.
Ciao, Marcus