diff -ur src.orig/CORE/ANEW.CPP src/CORE/ANEW.CPP
--- src.orig/CORE/ANEW.CPP	Sun Mar 18 05:41:24 2001
+++ src/CORE/ANEW.CPP	Sun Jan 12 15:41:57 2003
@@ -7,14 +7,25 @@
 #endif
 
 #include <stdlib.h>
-#include <new.h>
+#include <new>
 
 void *__do_newalloc(size_t);
 
 /************
  */
-void *operator new[](unsigned sz)
+void *operator new[](unsigned sz) /* throw(std::bad_alloc) */
 {
-    return __do_newalloc(sz);
+  return __do_newalloc(sz);
 }
 
+void *operator new[](unsigned sz, const std::nothrow_t &) throw()
+{
+  try
+  {
+    return __do_newalloc(sz);
+  }
+  catch (const std::bad_alloc &)
+  {
+    return NULL;
+  }
+}
diff -ur src.orig/CORE/CORENEW.CPP src/CORE/CORENEW.CPP
--- src.orig/CORE/CORENEW.CPP	Sun Mar 18 05:41:25 2001
+++ src/CORE/CORENEW.CPP	Sun Jan 12 15:42:54 2003
@@ -6,6 +6,34 @@
 #include <stdlib.h>
 #include <new.h>
 
+
+namespace std
+{
+const nothrow_t nothrow = nothrow_t();
+
+bad_alloc::bad_alloc() throw()
+{
+}
+
+bad_alloc::bad_alloc(const bad_alloc&) throw()
+{
+}
+
+bad_alloc& bad_alloc::operator=(const bad_alloc&) throw()
+{
+    return *this;
+}
+
+bad_alloc::~bad_alloc() throw()
+{
+}
+
+const char *bad_alloc::what() const throw()
+{
+    return "bad_alloc";
+}
+}
+
 /********************
  * _new_handler can be modified to point to a function in case
  * the allocation fails. _new_handler can attempt to repair things.
@@ -34,12 +60,16 @@
         if (m_size == 0)
             m_size++;
         p = malloc(m_size);
-        if (p != NULL || _new_handler == NULL)
-            break;
+	if (p != NULL)
+	  return p;
+
+        if (_new_handler == NULL)
+	  break;
+
         switch (__new_handler_type)
         {
             case ANSI_COMPAT:
-                (*(PFVV) _new_handler) ();
+                (*(std::new_handler) _new_handler) ();
                 keep_trying = 1;
                 break;
             case MS_COMPAT:
@@ -47,6 +77,7 @@
                 break;
         }
     }
-Done:
-    return p;
+
+    throw std::bad_alloc();
+    return NULL;
 }
diff -ur src.orig/CORE/_HANDLER.CPP src/CORE/_HANDLER.CPP
--- src.orig/CORE/_HANDLER.CPP	Thu Jan 02 14:47:30 1997
+++ src/CORE/_HANDLER.CPP	Sun Jan 12 15:55:29 2003
@@ -26,6 +26,11 @@
  *	previous value of _new_handler.
  */
 
+std::new_handler __cdecl std::set_new_handler(std::new_handler new_p) throw()
+{
+   return (std::new_handler) set_nh ((_PNH)new_p, ANSI_COMPAT);
+}
+
 PFVV set_new_handler(PFVV p)
 {
    return (PFVV)set_nh ((_PNH)p, ANSI_COMPAT);
@@ -67,4 +72,4 @@
       
    __new_handler_type = type;
    return old_handler;
-}
\ No newline at end of file
+}
diff -ur src.orig/CORE/_NEW.CPP src/CORE/_NEW.CPP
--- src.orig/CORE/_NEW.CPP	Thu Jan 02 14:47:32 1997
+++ src/CORE/_NEW.CPP	Sun Jan 12 14:33:45 2003
@@ -4,12 +4,24 @@
 /* Written by Walter Bright				*/
 
 #include <stdlib.h>
-#include <new.h>
+#include <new>
 
 void *__do_newalloc(size_t);
 
 
-void * operator new(size_t m_size)
+void * operator new(size_t m_size) /* throw(std::bad_alloc) */
 {   
    return __do_newalloc(m_size);
+}
+
+void * operator new(size_t m_size, const std::nothrow_t &) throw()
+{
+  try
+  {
+    return __do_newalloc(m_size);
+  }
+  catch (const std::bad_alloc &)
+  {
+    return NULL;
+  }
 }
diff -ur src.orig/CORE/_NEW2.CPP src/CORE/_NEW2.CPP
--- src.orig/CORE/_NEW2.CPP	Sun Mar 18 05:41:28 2001
+++ src/CORE/_NEW2.CPP	Sun Jan 12 14:19:14 2003
@@ -2,13 +2,13 @@
 /* Copyright (C) 1995 by Digital Mars	*/
 /* All Rights Reserved					*/
 
-#include <new.h>
+#include <new>
 
 /************
  * Overload of the operator new to take 2 arguments.
  * This overload is provided per the ANSI C++ Standard.
  */
-void *operator new(unsigned, void *p)
+void *operator new(unsigned, void *p) /* throw) */
 {
 	return (p);
 }
