[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: API levels and functions on Android
From: |
Bruno Haible |
Subject: |
Re: API levels and functions on Android |
Date: |
Thu, 19 Jan 2023 11:27:08 +0100 |
Paul Eggert wrote:
> > Defining REPLACE_GLOB=1 despite HAVE_GLOB=0 will be the way to make Gnulib
> > define 'rpl_glob' instead of 'glob', so that there is no conflict with
> > libc.so.
> >
> > I still need to work out the details how this would/will work. So as to
> > do things correctly on Android, while OTOH not adding lots of configure
> > tests
> > for the other platforms...
>
> Thanks for looking into this.
>
> On Android, should we always define REPLACE_WHATEVER when 'whatever'
> doesn't exist, at least for all the REPLACE_WHATEVER instances that
> currently exist in Gnulib? After all, 'whatever' might exist in some
> future Android version.
I think this would be overkill. Remember, for debuggability, when Gnulib
defines a function 'foo', we want gdb to know it by the name 'foo', if
there is no imperative to name it differently.
The two known imperatives are
- call it 'rpl_foo', to avoid a clash with libc,
- when shipping a shared library libgaga, call it 'libgaga_foo' or 'gaga_foo',
to avoid a clash with other shared libraries.
If none of these two imperatives apply, the name 'foo' without any prefix is
the natural choice.
> Would it make sense to wait until you've worked out the details, before
> installing patches like the REPLACE_UTIMENSAT=1 patch?
Yes, definitely.
Bruno