|
Message-ID: <d72fa67b-f000-56a1-9841-273637644ba2@gmail.com>
Date: Fri, 9 Dec 2022 21:25:44 +0100
From: Alejandro Colomar <alx.manpages@...il.com>
To: enh <enh@...gle.com>, musl@...ts.openwall.com
Subject: Re: [PATCH] memmem.3: Added list of known systems where this
is available
Hi!
On 11/30/22 20:39, enh wrote:
>
>
> On Wed, Nov 23, 2022 at 7:33 AM Shiz <hi@...z.me <mailto:hi@...z.me>> wrote:
>
> Hi there,
>
> > On 23 Nov Reiwa 4, at 14:16, Alejandro Colomar <alx.manpages@...il.com
> <mailto:alx.manpages@...il.com>> wrote:
> >
> >>>> - Android is not a real Unix system, in that you can't even program
> in C in
> >>>> there, unless you're Google or have hacked your system. It's not friendly
> >>>> to us programmers, so we don't need to be friendly to it. I don't want to
> >>>> be cluttering the pages with information that is irrelevant to normal
> users.
> >>>
> >>> I'm assuming bionic is being used in some of the Android free
> >>> alternatives too, but then I'm not sure how usable for programming those
> >>> are either. And, well musl libc is not a real Unix system you can program
> >>> against either. :)
> >
> > The difference is only that bionic is not in use in useful systems
> (AFAIK). :)
> >
> > So we have to do some decission here (and also about newlib, as reported
> by Brian).
>
> I’d like to chime in here and note that, valuations of usefulness aside, it *is*
> possible to develop in C against an Android device, without needing any hacks,
> using the NDK[1]. As someone who has occasionally worked on big codebases
> written
> in C and C++ for Android devices, I would argue there’s value to be had
> there. :-)
>
>
> plus i think bionic is the only libc that explicitly links to man7.org
> <http://man7.org> as the canonical source for documentation in its header files :-)
:-)
>
> funnily enough, this topic ("should the man pages talk about availability in
> libcs other than glibc?") came up before, and specifically for bionic mkerrisk
> seemed to think it was a reasonable idea ...
I agree with Michael.
> but i (bionic maintainer) was less
> convinced. although i think that, yes, if someone's reading that part of the
> page, realistically they're either interested in macOS/iOS or Android (sorry,
> AIX or IRIX fans!),
yep.
> but specifically for those two systems the header files
> already contain machine-readable availability information via
> __attribute__((__available__)).
>
> fwiw, here's an example from bionic's <unistd.h> illustrating both of those points:
>
> ```
> /**
> *
> [copy_file_range(2)](https://man7.org/linux/man-pages/man2/copy_file_range.2.html <https://man7.org/linux/man-pages/man2/copy_file_range.2.html>) copies
> * a range of data from one file descriptor to another.
> *
> * Returns the number of bytes copied on success, and returns -1 and sets `errno`
> * on failure.
> *
> * Available since API level 34.
> */
> ssize_t copy_file_range(int __fd_in, off64_t* __off_in, int __fd_out, off64_t*
> __off_out, size_t __length, unsigned int __flags) __INTRODUCED_IN(34);
> ```
>
> (if there's anything android-specific to note, we also mention that, but there
> are relatively few examples of those, and it's mostly just "SELinux means that
> only system processes can enable/disable swap" or whatever.)
>
> so it wasn't clear to me whether -- unless you automated it -- there was much
> value to duplicating that in the man pages? if you try to compile, you're going
> to get a clear compiler error saying "you need to be targeting OS version
> $whatever" anyway.
>
> i think the real question is "aye, but will they get that far?". for my part, i
> think the most value would come from cases that talk about "GNU extension" being
> a bit clearer whether that's "unique to glibc" (which a lot of people assume is
> what it means) or "initially in glibc, but a good enough idea that it's
> effectively ubiquitous now, even if it's not in POSIX because Solaris will never
> add it". and maybe the best way to clarify stuff like that is just to explicitly
> state "Available on macOS since 10.4. Available on Android since API level 23."?
> dunno.
>
> if anyone _does_ want to go that route, i'd be happy to help with the "raw data"
> side. (and certainly if anyone does start adding that, you'll force me to care
> about maintaining it :-) )
I don't "want", as in, doing a global dump of data into the pages. I have
better things in which to spend my time. However, if someone sends a patch for
one or another page, I'll accept it with the following requirements: It
references a free software libc. So for example, macOS no, Apple libc yes.
>
> but my biggest problem right now is that man7.org <http://man7.org> isn't being
> updated, and i can't get hold of mkerrisk to try to offer him money to do it :-(
I talked to him some months ago. The last times, he was always very busy. Good
luck contacting him! I still hope he will reappear some day...
If I see him again, I'll mention this offer to him.
> (i do hope he's okay, wherever he is!)
I hope he is!
Cheers,
Alex
--
<http://www.alejandro-colomar.es/>
Download attachment "OpenPGP_signature" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.