[Pacemaker] building dev on Solaris

David Lee t.d.lee at durham.ac.uk
Fri Sep 12 11:57:30 EDT 2008

On Fri, 12 Sep 2008, Paul Walsh wrote:

> David Lee wrote:
> > [...]
> > In heartbeat this sort of thing occured with several routines, and the
> > subdirectory "replace/" was designed and maintained to handle it.
> >
> > Presumably there is a "replace/" in pacemaker?
> >
> > The alternative thing we did on such occurences was to see whether there
> > was a nearby routine of similar functionality but wider availability, and
> > adjust the source code, if reasonably possible, to use that.
> >
> >
> So a suitably modified version of an "offending" piece of code placed
> in replace/ would take precedence over the original?
> I suppose the question here is whether to have a modified version of
> lib/common/xml.c (the code that calls vasprintf) put in replace/ or
> whether to attempt to get a version of vasprintf working on Solaris.
> Should be quite a challenge for someone who's hardly ever touched C ;)

My earlier comment was perhaps upside down.

The first question should be the one about finding a similar, but more
portable (i.e. explore man pages around "vasprintf" for something similar
and, within reason, useable).  See below.

Only if that fails (nothing similar to "vasprintf", or using a similar
thing would be significantly uglier) fall back to the "replace/" option.

The whole of the original "heartbeat" was free of vasprintf.  So it is
reasonably likely that the occurence you have found could be adjusted to
use something similar but more consistent with the rest of the code.

Sorry, I'm significantly way from heartbeat development at present.
Otherwise I'd have tried my best to assist with the actual code.

But here is a VERY useful site for portability work: it has man pages for
a variety of systems:

So you can see what "vasprintf" is intended to provide.


:  David Lee                                I.T. Service          :
:  Senior Systems Programmer                Computer Centre       :
:  UNIX Team Leader                         Durham University     :
:                                           South Road            :
:  http://www.dur.ac.uk/t.d.lee/            Durham DH1 3LE        :
:  Phone: +44 191 334 2752                  U.K.                  :

More information about the Pacemaker mailing list