Re: mpr: fix a compiler error on PowerPC
On Fri, 2 Jan 2009, Austin English wrote:
CHAR defaults to unsigned char on PowerPC, so explicitly setting hi/lo to signed char to avoid this error.
CHAR is a Windows type so I don't think it's right for it to be unsigned on PowerPC. Even more so since there is a UCHAR type. So I think the right thing to do is to fix the CHAR declaration in wtypes.h and winnt.h. -- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ Research is the transformation of money to knowledge. Innovation is the transformation of knowledge to money. -- Dr. Hans Meixner
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 2 Jan 2009, Austin English wrote:
CHAR defaults to unsigned char on PowerPC, so explicitly setting hi/lo to signed char to avoid this error.
CHAR is a Windows type so I don't think it's right for it to be unsigned on PowerPC. Even more so since there is a UCHAR type.
So I think the right thing to do is to fix the CHAR declaration in wtypes.h and winnt.h.
No, CHAR is really supposed to be the same thing as char, since it's used for strings. Otherwise you'll need casts all over the place. -- Alexandre Julliard julliard(a)winehq.org
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 2 Jan 2009, Austin English wrote:
CHAR defaults to unsigned char on PowerPC, so explicitly setting hi/lo to signed char to avoid this error.
CHAR is a Windows type so I don't think it's right for it to be unsigned on PowerPC. Even more so since there is a UCHAR type.
So I think the right thing to do is to fix the CHAR declaration in wtypes.h and winnt.h.
No, CHAR is really supposed to be the same thing as char, since it's used for strings. Otherwise you'll need casts all over the place.
Ideally we'd check whether 'char' was signed or unsigned in Visual C++ for PowerPC (there was a Windows NT 3.51 for PowerPC). I doubt that Microsoft would have made it unsigned and then we'd need to do the same to really be source compatibile. But since we're very unlikely to ever be able to check that and since Windows on PowerPC is pretty irrelevant anyway we can forget about it. -- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ If it stinks, it's chemistry. If it moves, it's biology. If it does not work, It's computer science.
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
No, CHAR is really supposed to be the same thing as char, since it's used for strings. Otherwise you'll need casts all over the place.
Ideally we'd check whether 'char' was signed or unsigned in Visual C++ for PowerPC (there was a Windows NT 3.51 for PowerPC). I doubt that Microsoft would have made it unsigned and then we'd need to do the same to really be source compatibile.
Sure, but we would do that by adding -fsigned-char in winegcc, not by making CHAR and char two different types.
But since we're very unlikely to ever be able to check that and since Windows on PowerPC is pretty irrelevant anyway we can forget about it.
Yep. -- Alexandre Julliard julliard(a)winehq.org
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
No, CHAR is really supposed to be the same thing as char, since it's used for strings. Otherwise you'll need casts all over the place.
Ideally we'd check whether 'char' was signed or unsigned in Visual C++ for PowerPC (there was a Windows NT 3.51 for PowerPC). I doubt that Microsoft would have made it unsigned and then we'd need to do the same to really be source compatibile.
Sure, but we would do that by adding -fsigned-char in winegcc, not by making CHAR and char two different types.
Oh. Good point. I forgot about that one. I guess that's a hint for Austin <g>... -- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ War doesn't determine who's right. War determines who's left.
On Fri, Jan 9, 2009 at 4:17 PM, Francois Gouget <fgouget(a)free.fr> wrote:
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
No, CHAR is really supposed to be the same thing as char, since it's used for strings. Otherwise you'll need casts all over the place.
Ideally we'd check whether 'char' was signed or unsigned in Visual C++ for PowerPC (there was a Windows NT 3.51 for PowerPC). I doubt that Microsoft would have made it unsigned and then we'd need to do the same to really be source compatibile.
Sure, but we would do that by adding -fsigned-char in winegcc, not by making CHAR and char two different types.
Oh. Good point. I forgot about that one. I guess that's a hint for Austin <g>...
-- Francois Gouget <fgouget(a)free.fr> http://fgouget.free.fr/ War doesn't determine who's right. War determines who's left.
I thought about doing that, but it seemed a bit heavy handed to me. If Alexandre's fine with that, I'll send a patch. I asked Stephen to ask ReactOS if anyone had a copy of Visual C++ for Power PC, so maybe we can find out what M$ does there for char. -- -Austin
Francois Gouget <fgouget(a)free.fr> writes:
On Fri, 9 Jan 2009, Alexandre Julliard wrote:
Sure, but we would do that by adding -fsigned-char in winegcc, not by making CHAR and char two different types.
Oh. Good point. I forgot about that one. I guess that's a hint for Austin <g>...
No, we don't want to use it for Wine itself. -- Alexandre Julliard julliard(a)winehq.org
participants (3)
-
Alexandre Julliard -
Austin English -
Francois Gouget