bug-gnulib@gnu.org mirror (unofficial)
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Reuben Thomas <rrt@sc3d.org>
Cc: bug-gnulib <bug-gnulib@gnu.org>
Subject: Re: 'relocatable' project built without --enable-relocatable
Date: Thu, 25 Apr 2024 14:07:27 +0200	[thread overview]
Message-ID: <9180429.mT2jXtDnLo@nimes> (raw)
In-Reply-To: <CAOnWdohJMvj73fx4Kd6ErRNSoxxgk8JggZ-S8k_wWqSTC41eUw@mail.gmail.com>

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	other threads:[~2024-04-25 12:07 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23 10:27 'relocatable' project built without --enable-relocatable Reuben Thomas
2024-04-23 19:46 ` Bruno Haible
2024-04-23 19:58   ` Reuben Thomas
2024-04-23 23:24     ` Bruno Haible
2024-04-24 20:36       ` Reuben Thomas
2024-04-25 12:07         ` Bruno Haible [this message]
2024-04-25 12:22           ` Reuben Thomas
2024-04-23 23:51     ` Gnulib in Debian Bruno Haible
2024-04-24 11:26       ` Reuben Thomas
2024-04-24 13:56         ` Simon Josefsson via Gnulib discussion list
2024-04-24 19:15           ` Reuben Thomas
2024-04-25 13:29           ` GNULIB_REVISION Bruno Haible
2024-04-25 16:26             ` GNULIB_REVISION Simon Josefsson via Gnulib discussion list
2024-04-25 17:00               ` GNULIB_REVISION Paul Eggert
2024-04-25 17:43                 ` GNULIB_REVISION Simon Josefsson via Gnulib discussion list
2024-04-25 18:49                   ` GNULIB_REVISION Paul Eggert
2024-04-25 17:48                 ` GNULIB_REVISION Collin Funk

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://lists.gnu.org/mailman/listinfo/bug-gnulib

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9180429.mT2jXtDnLo@nimes \
    --to=bruno@clisp.org \
    --cc=bug-gnulib@gnu.org \
    --cc=rrt@sc3d.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).