Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cxx.cc « cygwin « winsup - cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: b52485a2009bd61fe51983dca57d4f99734dba28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/* cxx.cc

   Copyright 2002 Red Hat, Inc.

This file is part of Cygwin.

This software is a copyrighted work licensed under the terms of the
Cygwin license.  Please consult the file "CYGWIN_LICENSE" for
details. */

#if (__GNUC__ >= 3)

#include "winsup.h"
#include <stdlib.h>

void *
operator new (size_t s)
{
  void *p = malloc (s);
  if (p)
    memset (p,0,s);
  return p;
}

void
operator delete (void *p)
{
  free (p);
}

void *
operator new[] (size_t s)
{
  return ::operator new (s);
}

void
operator delete[] (void *p)
{
  ::operator delete (p);
}

extern "C" void
__cxa_pure_virtual (void)
{
  api_fatal ("pure virtual method called");
}

#endif