error in awt_DnDDS.cpp building OpenJDK7/Windows

Phil Race philip.race at oracle.com
Wed May 5 17:13:42 UTC 2010


This has been noticed. Hence the bug. AWT suggested the fix below
I expect to have this fix pushed along with some other work, if not 
sooner, but
you can apply it yourself for now.

-phil.

diff --git a/src/windows/native/sun/windows/awt_DnDDS.cpp 
b/src/windows/native/sun/windows/awt_DnDDS.cpp
--- a/src/windows/native/sun/windows/awt_DnDDS.cpp
+++ b/src/windows/native/sun/windows/awt_DnDDS.cpp
@@ -29,20 +29,15 @@
 //we need <new> inclusion for STL "new" oprators set.
 #define bad_alloc zbad_alloc
 #include <new>
+
+#if defined(_DEBUG) || defined(DEBUG)
+extern void * operator new(size_t size, const char * filename, int 
linenumber);+void * operator new(size_t size) {return operator new(size, 
"stl", 1);}
+#endif
+#include <map>
+
 #pragma pop_macro("bad_alloc")
 //"bad_alloc" is undefined from here
-
-//we need to include any STL container before <awt.h> inclusion due to
-//"new" re-redefinition that is in conflict with in-place new allocator
-//applied in STL.
-#if defined(_DEBUG) || defined(DEBUG)
-    //forward declaration of "new" operator from <awt.h>
-    extern void * operator new(size_t size, const char * filename, int 
linenumber);
-    //"new" operator definition that is consistent with re-defined
-    //in <awt.h> "delete" operator
-    void * operator new(size_t size) {return operator new(size, "stl", 1);}
-#endif
-#include <map>

 #include <awt.h>
 #include <shlobj.h>

Raffaello Giulietti wrote:
> I'm on Vista 32-bit and have VisualStudio 2008 Professional installed.
>
> After some days hunting for backslashes, spaces and colons in paths, I
> now encounter a compilation error that seems to be known
> (http://bugs.sun.com/bugdatabase/view_bug.do;jsessionid=cc2b5a48cddee8e8cdbb6795b07?bug_id=6936319).
>
> Does anybody know how to circumvent or fix it?
>
> With this error, and perhaps even other ones I've not yet seen, I'm
> wondering how Sun/Oracle can build the binary snapshots if they are
> supposed to use the same tool chain that I'm using :-(
> I'm beginning to think that they possess some special magic or some
> undocumented killer tool.
>
> Thanks in advance for any support
> Raffaello
>   




More information about the build-dev mailing list