po: Update German man pages translation
[dpkg.git] / dselect / cxx-support.cc
blobdc3b36d348a24fafd209f9f9a83faa75e44521b6
1 /*
2 * dselect - Debian package maintenance user interface
3 * cxx-support.cc - C++ support code for dselect
5 * Copyright © 1994-1996 Ian Jackson <ijackson@chiark.greenend.org.uk>
6 * Copyright © 2006-2015 Guillem Jover <guillem@debian.org>
8 * This is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program. If not, see <https://www.gnu.org/licenses/>.
22 #include <config.h>
23 #include <compat.h>
25 #include <sys/types.h>
27 #include <stdlib.h>
28 #ifdef HAVE_CXXABI_H
29 #include <cxxabi.h>
30 #endif
32 #include <new>
34 #include <dpkg/dpkg.h>
36 extern void *
37 operator new(size_t size) DPKG_ATTR_THROW(std::bad_alloc)
39 return m_malloc(size);
42 extern void *
43 operator new[](size_t size) DPKG_ATTR_THROW(std::bad_alloc)
45 return m_malloc(size);
48 extern void
49 operator delete(void *p) DPKG_ATTR_NOEXCEPT
51 free(p);
54 extern void
55 operator delete(void *p, size_t size) DPKG_ATTR_NOEXCEPT
57 free(p);
60 extern void
61 operator delete[](void *a) DPKG_ATTR_NOEXCEPT
63 free(a);
66 extern void
67 operator delete[](void *a, size_t size) DPKG_ATTR_NOEXCEPT
69 free(a);
72 #ifdef HAVE___CXA_PURE_VIRTUAL
73 namespace __cxxabiv1 {
75 extern "C" void
76 __cxa_pure_virtual()
78 internerr("pure virtual function called");
82 #endif