This is the mail archive of the elfutils-devel@sourceware.org mailing list for the elfutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Check for existence of asprintf and vasprintf


On 22 Feb 2017 17:45, Ulf Hermann wrote:
> > imo, elfutils shouldn't be growing these fallback implementations itself.
> > if you want to do this stuff, use gnulib instead.
> > 
> > then there is no ifdef hell in the source files, and you don't have to
> > worry about testing whether the ifdef's are correct because gnulib did
> > it all for you.
> 
> OK, so I won't post any more patches with replacement functions. I don't like the idea of using gnulib because the gnulib implementations are generally more complex and in order to maintain them I would have to track gnulib in addition to elfutils.

sorry, but i don't know what you're talking about.  you don't read the
gnulib code/modules directly, you just run gnulib-tool and tell it which
modules to import.  it does all the rest for you.

you want asprintf ?  then add it to the list.
modules=(
	asprintf
	glob
	vasprintf
	...whatever else you want...
)
gnulib-tool --import "${modules[@]}"

stick that in an autogen.sh script.

> Also I would have to review the licenses for each import. This is not something I'm excited to do for a few 3-line functions. But OK, I will consider it.

gnulib-tool has a --lgpl=[...] flag so you can automatically abort if
the desired license compatibility level isn't met.  so you don't have
to directly review every module if it isn't aborting.
-mike

Attachment: signature.asc
Description: Digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]