Hi Jeffrey, On 11/23/22 15:55, Jeffrey Walton wrote:
On Wed, Nov 23, 2022 at 9:29 AM Alejandro Colomar <alx.manpages@xxxxxxxxx> wrote:...In any case I also find it useful to have this kind of portability information when deciding what to use in code.And I must admit it's also useful to me (this all started because Andrew and I had to use memmem(3) at a project where macOS compatibility is relevant --not critical, but relevant--).If you are a die-hard free software person using GNU gear, then Gnulib provides memmem. There's no need to worry about availability or portability courtesy of Gnulib. See https://www.gnu.org/software/gnulib/manual/html_node/memmem.html .
Thanks!However, for this project I was talking about, it's not an option; such a dependency would not be accepted.
BTW, personally, I always found very confusing the usage of Gnulib compared to normal packaged libraries. Maybe it's just me; don't know. It also forces you to use GNU autotools, which I don't like at all. I prefer the approach of libbsd, which just provides a couple of pc(5) files to allow using as a library or as an overlay over the system libc, and after that you're fine with whatever build system you prefer. I know it has some issues, such as <https://gitlab.freedesktop.org/libbsd/libbsd/-/issues/5>, which may be the reason Gnulib works that way, I don't know.
Guillem, do you think that issue with libbsd and <queue.h> can be fixed? Or is it an inherent issue of the way the overlay works? Maybe it would be interesting to fix it, as a proof of concept that something like Gnulib could be implemented in that way.
Cheers, Alex -- <http://www.alejandro-colomar.es/>
Attachment:
OpenPGP_signature
Description: OpenPGP digital signature