On Tue, 23 Apr 2024 at 21:46, Bruno Haible <bruno@clisp.org> wrote:
How does or would the code you are talking about look like, with #ifs?
And would it be code for a library, or for a program?

For a library. For example, from the libpaper commit referenced below, using #ifdefs:

/* Set the prefix directory for relocation. */
void papersetprefixdir(const char *new_prefix)
{
#ifdef ENABLE_RELOCATABLE
    set_relocation_prefix (INSTALLPREFIX, new_prefix);
#else
    (void)new_prefix;
#endif
}

I'm asking because no package I know of is using set_relocation_prefix
explicitly [1]
I've been using it in Enchant since 2017[1] and in libpaper since 2021[2]


(this is definitely in Debian by now)


(not yet in Debian, sadly, as they don't like me "vendoring gnulib", as FTP Master calls it, or "using gnulib as other packages like Enchant do, and as designed", as I call it).

--
https://rrt.sc3d.org