Control: tags -1 patch

Dear Maintainer,

In Ubuntu, the attached patch was applied to achieve the following:

  * dumapp.{cpp,h}: Apply patch from Buildroot (thanks, Yann E. MORIN!) to fix
    FTBFS with C++14.

Thanks for considering the patch. It was found here:
https://github.com/maximeh/buildroot/blob/master/package/duma/0003-fix-C%2B%2B14.patch

Logan Rosen
--- duma-2.5.15.orig/dumapp.cpp
+++ duma-2.5.15/dumapp.cpp
@@ -190,7 +190,9 @@
  * (11) = (a) ; ASW
  */
 void * DUMA_CDECL operator new( DUMA_SIZE_T size )
+#ifdef DUMA_EXCEPTION_SPECS
 throw(std::bad_alloc)
+#endif
 {
   return duma_new_operator(size, EFA_NEW_ELEM, true  DUMA_PARAMS_UK);
 }
@@ -254,7 +256,9 @@
  * (21) = (a) ; AAW
  */
 void * DUMA_CDECL operator new[]( DUMA_SIZE_T size )
+#ifdef DUMA_EXCEPTION_SPECS
 throw(std::bad_alloc)
+#endif
 {
   return duma_new_operator(size, EFA_NEW_ARRAY, true  DUMA_PARAMS_UK);
 }
--- duma-2.5.15.orig/dumapp.h
+++ duma-2.5.15/dumapp.h
@@ -35,6 +35,10 @@
 
 #include "duma.h"
 
+#if __cplusplus < 201103L
+  #define DUMA_EXCEPTION_SPECS 1
+#endif
+
 /* remove previous macro definitions */
 #include "noduma.h"
 

Reply via email to