[dpkg] 192/200: dselect: Do not depend on cxxabi.h to have declared __cxa_pure_virtual

Ximin Luo infinity0 at debian.org
Wed Apr 5 15:17:39 UTC 2017


This is an automated email from the git hooks/post-receive script.

infinity0 pushed a commit to branch master
in repository dpkg.

commit 7b1b21e4c94ca046141e4d13bd96a0a3d1b6169f
Author: Jörg Sonnenberger <joerg at netbsd.org>
Date:   Wed Feb 15 03:42:40 2017 +0100

    dselect: Do not depend on cxxabi.h to have declared __cxa_pure_virtual
    
    The C++ ABI specifies that these functions are within the “__cxxabiv1”
    namespace, and that “abi” is an alias to be used by userland. But in
    this case as we are replacing the implementation we should also use the
    same canonical namespace.
    
    Signed-off-by: Guillem Jover <guillem at debian.org>
---
 debian/changelog       | 4 ++++
 dselect/cxx-support.cc | 6 +++++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 7602352..ec7f51f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,10 @@ dpkg (1.18.23) UNRELEASED; urgency=medium
   * Handle unmatched arch-qualified virtual packages in dpkg-genbuildinfo,
     instead of letting perl die. Closes: #849944
   * Declare .buildinfo format as stable with version 1.0.
+  * Do not depend on cxxabi.h to have declared __cxa_pure_virtual, use
+    the same “__cxxabiv1” namespace as specified in the C++ ABI, instead
+    of using the “abi” alias intended for use by userland.
+    Thanks to Jörg Sonnenberger <joerg at netbsd.org>.
   * Portability:
     - Do not redeclare sys_siglist in libcompat when the system does so.
       Thanks to Thomas Klausner <wiz at NetBSD.org>.
diff --git a/dselect/cxx-support.cc b/dselect/cxx-support.cc
index 1339b7a..35f2543 100644
--- a/dselect/cxx-support.cc
+++ b/dselect/cxx-support.cc
@@ -81,9 +81,13 @@ operator delete[](void *a, size_t size) DPKG_ATTR_NOEXCEPT
 }
 
 #ifdef HAVE___CXA_PURE_VIRTUAL
+namespace __cxxabiv1 {
+
 extern "C" void
-abi::__cxa_pure_virtual()
+__cxa_pure_virtual()
 {
 	internerr("pure virtual function called");
 }
+
+}
 #endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git



More information about the Reproducible-commits mailing list