bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'relocatable' project built without --enable-relocatable


From: Bruno Haible
Subject: Re: 'relocatable' project built without --enable-relocatable
Date: Thu, 25 Apr 2024 14:07:27 +0200

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  <bruno@clisp.org>

        relocatable-lib-lgpl: Allow unconditional use of set_relocation_prefix.
        Reported by Reuben Thomas <rrt@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))
 






reply via email to

[Prev in Thread] Current Thread [Next in Thread]