From: Allin C. <cot...@wf...> - 2018-05-10 13:31:45
|
I see that since 2017-02-09 gnuplot requires version 2.28 or higher of GLib, on account of use of the macro g_clear_object. Unfortunately it can be difficult to build GLib on (or for) some older systems, such as OS X <= 10.4, but older GLib versions are easier (e.g. 2.18). I'd like to suggest pushing the GLib dependency back to 2.18 and adding a simple compatibility macro in gp_cairo.c. Here's an illustrative diff relative to 5.2.3: --- gp_cairo.c.orig 2018-05-09 16:46:59.510301745 -0400 +++ gp_cairo.c 2018-05-10 08:32:07.378541918 -0400 @@ -77,6 +77,13 @@ #define rint(x) floor((x)+0.5L) #endif +#if GLIB_MAJOR_VERSION == 2 && GLIB_MINOR_VERSION < 28 +#define g_clear_object(op) \ + { gpointer *_p = (gpointer) (op); \ + if (_p && *_p) { g_object_unref(*_p); *_p = NULL; } \ + } +#endif + /* undef this to see what happens without the Symbol-to-unicode processing */ #define MAP_SYMBOL Any thoughts? -- Allin Cottrell Department of Economics Wake Forest University, NC |