[patch openjdk/icedtea] fix build failures with gcc-4.3

Bernhard Rosenkraenzer bero at arklinux.org
Fri Nov 30 08:27:18 PST 2007


On Fri, 30 Nov 2007 13:56:22 +0100, Matthias Klose <doko at ubuntu.com> wrote:
> Fixes to build with current GCC from the trunk.

We've been applying a similar patch for a while. Minor nit:

-#if _MSC_VER >= 1300 // Visual C++ 7.0 or later 
+#if _MSC_VER >= 1300 || (__GNUC__ * 10 + __GNUC_MINOR__ >= 43) // Visual
C++ 7.0 or later, GCC-4.3 or later
 #include <iostream> 
 #else
 #include <iostream.h>

I think it would be better to just use

#if defined(__GNUC__) || _MSC_VER >= 1300

#include <iostream> has worked in gcc forever, and #include <iostream.h>
has been deprecated (but accepted before 4.3) for ages -- so by doing the
right thing even for older gccs, we can get rid of warnings there.





More information about the distro-pkg-dev mailing list