[PATCHES] Fixes for C++ compilation with -Wold-style cast

I try to get a clean compile for a project using SDL. But I get warnings
from SDL headers when I use -Wold-style-cast. This is especially bad
because I plan to build the software with -Werror=old-style-cast when we
have switched over to GCC 4.2, which has that option.

But this problem can be fixed in the SDL headers. I checked out the SVN
version and made some patches. See the attached patch called SDL-cast.diff.

I also modified SDL_net (see the attached patch called
SDN_net-cast.diff, also against the SVN version). First I had to change
an include to build it against the SVN version of SDL. Then I did some
cast changes there as well.

The project I work on does not use all macros that I changed, so I have
not tested all changes. But if something breaks when building for C++,
it is probably because there is a static_cast where only a
reinterpret_cast is accepted.

I hope to see this issue fixed in the next release.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: SDL-cast.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080108/d7df87e7/attachment.txt
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed…
Name: SDL_net-cast.diff
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20080108/d7df87e7/attachment.asc