Patch for build error on Ubuntu LTS

Jacob Mandelson <[email protected]> Tue, 6 Jun 2017 11:58:12 -0700
Newsgroups gmane.editors.abiword.devel
Message-ID <[email protected]>

--WIyZ46R2i8wDzkSu
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

Greetings abiword devs,

abiword 3.0.2 (latest release) fails to build on Ubuntu 16.04.2 LTS
using g++ 5.4.0 with these fatal compile-time errors:

gr_UnixCairoGraphics.cpp:183:37: error: ‘nullptr’ was not declared in this scope
  m_styleBg = XAP_GtkStyle_get_style(nullptr, "GtkButton"); // "button"
gr_UnixCairoGraphics.cpp:630:30: error: ‘nullptr’ was not declared in this scope
   GtkStyleContext *context = nullptr;

These errors are trivial to fix by replacing the undeclared 'nullptr'
identifier with the literal '0', after which abiword builds and runs
properly.  A patch that does this is attached.

Be well,
    -- Jacob

--WIyZ46R2i8wDzkSu
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="abiword.patch"

--- gr_UnixCairoGraphics.cpp.orig	2017-06-06 17:54:57.782535095 +0000
+++ gr_UnixCairoGraphics.cpp	2017-06-06 17:55:14.590257997 +0000
@@ -180,7 +180,7 @@
 	if (m_styleBg) {
 		g_object_unref(m_styleBg);
 	}
-	m_styleBg = XAP_GtkStyle_get_style(nullptr, "GtkButton"); // "button"
+	m_styleBg = XAP_GtkStyle_get_style(0, "GtkButton"); // "button"
 	// guess colours
 	// WHITE
 	GdkRGBA rgba2;
@@ -627,7 +627,7 @@
 		_setProps();
 		cairo_save (m_cr);
 
-		GtkStyleContext *context = nullptr;
+		GtkStyleContext *context = 0;
 		switch(c) {
 		case GR_Graphics::CLR3D_Background:
 			context = m_styleBg;

--WIyZ46R2i8wDzkSu--