mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] Promoting extension functions up from _GNU_SOURCE ?
@ 2021-09-27 23:35 Rich Felker
  2021-09-28  5:20 ` Quentin Rameau
  0 siblings, 1 reply; 4+ messages in thread
From: Rich Felker @ 2021-09-27 23:35 UTC (permalink / raw)
  To: musl

In a related discussion on IRC, and in light of merging qsort_r, I
noticed that memmem and likely a large number of other functions that
we share with the BSDs are only exposed under _GNU_SOURCE. This seems
wrong. In some cases that's what glibc is doing too, but that's not a
very good reason to do the same. Some of these, like memmem and
qsort_r, are even approved for the next issue of POSIX.

I think it makes sense to start by making a list of functions that are
presently _GNU_SOURCE that the BSDs also have, and then, as long as
they are useful (as opposed to legacy junk) functions we want to treat
as well-supported functionality, and as long as the names are not
problematic, plan to move most or all to _BSD_SOURCE (default
exposure).

For the ones that are POSIX-future, we could go ahead and move them to
baseline _POSIX_C_SOURCE, or wait a bit. Note that we already have
some POSIX-future functions like dup3 and pipe2 exposed that way. For
ones that are in a reserved namespace (like memmem, which matches the
mem* reservation for string.h) I think it'd be very reasonable to move
them right away. For the others, we should probably look at possible
consequences.

Does this sound reasonable? Any volunteers to make such a list?

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-28 17:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-27 23:35 [musl] Promoting extension functions up from _GNU_SOURCE ? Rich Felker
2021-09-28  5:20 ` Quentin Rameau
2021-09-28 12:39   ` Rich Felker
2021-09-28 17:04     ` Quentin Rameau

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

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 NNTP newsgroup(s).