Re: Relocatable: relocate2

2017-07-30 Thread Bruno Haible
Hi Reuben, > I noticed relocate2 recently. Unfortunately, it's rather awkward to use, as > it requires one to keep track of two pointers. The idiom is: char *allocated; const char *rel_pathname = relocate2 (..., &allocated); ... free (allocated); This is the mini

Relocatable: relocate2

2017-07-26 Thread Reuben Thomas
I noticed relocate2 recently. Unfortunately, it's rather awkward to use, as it requires one to keep track of two pointers. The obvious "lazy" API for code that doesn't mind allocation is for the relocated path always to be allocated. Would a patch to add such a version of relocate (suggestions for