Per POSIX, <sched.h> is in ths [PS] (Process Scheduling) option. You can identify whether [PS] is implemented at compile time, by the value of _POSIX_PRIORITY_SCHEDULING defined in <unistd.h>. This can be one of
* Undefined or -1, functionality never supported * 0, functionally *maybe* supported (you can enquire with sysconf(_SC_PRIORITY_SCHEDULING) at runtime). You can compile against it, but it might not work. * 200809L, supported per POSIX 2008 (Or potentially a different value for a different version of POSIX) (The sysconf call can return either -1 or 200809L) musl doesn't define _POSIX_PRIORITY_SCHEDULING, so per POSIX is declaring that it does not support that function grouping. On Wed, Aug 30, 2017 at 9:42 AM Rob Landley <[email protected]> wrote: > On 08/29/2017 10:32 AM, enh wrote: > > On Tue, Aug 29, 2017 at 8:32 AM, enh <[email protected]> wrote: > >> can't you just infer musl from the relatively small > > > > ...number of c libraries out there... > > It would work, but I'm uncomfortable with it. > > People keep threatening to port toybox to to BSD and MacOS, there is an > active uClibc fork buildroot's using, it's posible newlib, klibc, or > dietlibc will grow legs someday, far down on my todo list is maybe > porting toybox to xv6, what library is fuchsia using, musl itself didn't > publicly exist ~5 years ago... > > The posix API is insufficient so I'm using Linux as my API, but > freebsd's Linux emulation layer is a viable target too, and I wanted the > rest of it to be as generic as I could with target-specific stuff hidden > in portability.h. That means C library, compiler, processor architecture... > > I'm not sure that's _achievable_ with musl refusing to identify itself > because its' experience is universal and everyone else is wrong... > > Sigh. If I'm going to have the "else case" apply workarounds, I might as > well make the workarounds apply to everybody. Calling the syscalls > directly isn't that big a deal. > > But having musl stay broken because it broke itself seems pretty > reasonable too. The fact is, Linux has a system call and the man page > says we have a certain behavior, and musl isn't supporting that. If you > build against a uClibc where you switched off regex support, grep won't > work. If you build against a musl you haven't fixed, chrt won't work... > > (This is one of those "the choices are close enough that there's no > obvious winner" things that's harder to make than a more important > decision would be. :) > > Right now I've thrown it back on the todo list, which means "musl stays > broken" is the default for now. Probably acceptable. Lemme finish this > utf8 plumbing and then I need to fix ps again, then get back to... was > lsof or dd next? > > Rob > > (Taking a break from endless GPS. For some reason it takes me about a > day to switch mental contexts after doing serious GPS stuff, and I keep > getting sucked back into "5 more minutes of GPS, just this one quick > thing" that turns into 8 hours, so I'm saying no a bit because the > toybox todo heap is teetering dangerously September 19th is the 3 month > anniversary of last release which means time for a new one...) > _______________________________________________ > Toybox mailing list > [email protected] > http://lists.landley.net/listinfo.cgi/toybox-landley.net >
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
