OSDN Git Service

Replace valid memory checks with new myfault class "exception handling", almost
[pf3gnuchains/pf3gnuchains4x.git] / winsup / cygwin / cxx.cc
1 /* cxx.cc
2
3    Copyright 2002, 2003 Red Hat, Inc.
4
5 This file is part of Cygwin.
6
7 This software is a copyrighted work licensed under the terms of the
8 Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
9 details. */
10
11 #if (__GNUC__ >= 3)
12
13 #include "winsup.h"
14 #include <stdlib.h>
15
16 void *
17 operator new (size_t s)
18 {
19   void *p = calloc (1, s);
20   return p;
21 }
22
23 void
24 operator delete (void *p)
25 {
26   free (p);
27 }
28
29 void *
30 operator new[] (size_t s)
31 {
32   return ::operator new (s);
33 }
34
35 void
36 operator delete[] (void *p)
37 {
38   ::operator delete (p);
39 }
40
41 extern "C" void
42 __cxa_pure_virtual (void)
43 {
44   api_fatal ("pure virtual method called");
45 }
46
47 extern "C" void
48 __cxa_guard_acquire ()
49 {
50 }
51
52 extern "C" void
53 __cxa_guard_release ()
54 {
55 }
56 #endif