6916867: Fastdebug build failed after CR 4874070 fix putback.
authoruta
Thu, 14 Jan 2010 17:56:49 +0300
changeset 4833 3410bf2a3349
parent 4832 3a5dc2107fed
child 4834 2571be1e8f1d
6916867: Fastdebug build failed after CR 4874070 fix putback. Reviewed-by: art, dcherepanov
jdk/src/windows/native/sun/windows/awt_DnDDS.cpp
--- a/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp	Wed Jan 13 17:10:23 2010 +0300
+++ b/jdk/src/windows/native/sun/windows/awt_DnDDS.cpp	Thu Jan 14 17:56:49 2010 +0300
@@ -32,15 +32,20 @@
 #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 <memory.h>
 #include <shlobj.h>
-#include <map>
 
 #include "jlong.h"
 #include "awt_DataTransferer.h"