Reuben Thomas wrote: > > Can you please try the attached patch? > > Works beautifully, thanks.
OK, I'm committing as shown below. > Is there a reason not to make a similar macro for compute_curr_prefix? Yes: - For compute_curr_prefix, the need has not been demonstrated. - Even if ENABLE_RELOCATABLE is 1, there are cases when compute_curr_prefix is not defined. 2024-04-25 Bruno Haible <br...@clisp.org> relocatable-lib-lgpl: Allow unconditional use of set_relocation_prefix. Reported by Reuben Thomas <r...@sc3d.org> in <https://lists.gnu.org/archive/html/bug-gnulib/2024-04/msg00384.html>. * lib/relocatable.h (set_relocation_prefix): Define in a dummy way if ENABLE_RELOCATABLE is not defined. diff --git a/lib/relocatable.h b/lib/relocatable.h index 162f9d82a4..0c10ebe2a1 100644 --- a/lib/relocatable.h +++ b/lib/relocatable.h @@ -109,6 +109,8 @@ extern char * compute_curr_prefix (const char *orig_installprefix, #else /* By default, we use the hardwired pathnames. */ +#define set_relocation_prefix(orig_prefix, curr_prefix) \ + ((void) (orig_prefix), (void) (curr_prefix)) #define relocate(pathname) (pathname) #define relocate2(pathname,allocatedp) (*(allocatedp) = NULL, (pathname))