As someone who has a vested interest in having less generated code (because I'd like to stop checking in generated files and use toybox in the AOSP build[1])... do we even need to do this? How many of these defines are missing on glibc/musl/bionic? If it's only one or two as I assume, could we just have the #ifdefs instead?
Or are there actually a large number of these missing? ___ 1. The real problem for me there is that I don't want to replicate all your scripts in the AOSP build system, but I do want to do the equivalent work. If it were just the help and flags, I'd probably swallow it --- the library availability is something I can hard code anyway. But random stuff like this is something I'd much rather avoid... On Fri, Sep 28, 2018, 14:41 enh <[email protected]> wrote: > $ ./toybox getconf NPROCESSORS_CONF NPROCESSORS_ONLN > 48 > 2097152 > > seems like this isn't working: > > # Extract names, remove blank lines, filter, replace unknown #defines > # with UNKNOWN > sed -n "/char [*]${1}_names[[]/"',/^}/s/[^"]*"\([^"]*\) *",*/\1\n/pg' \ > toys/posix/getconf.c | grep -v '^$' | $2 | > sed -e "$DEFINES" -e "t;d;a UNKNOWN" | xargs | tr ' ' ',' && > echo '};' > > glibc doesn't have an _XOPEN_UUCP but instead of the promised UNKNOWN, > everything after that is just off-by-one... >
_______________________________________________ Toybox mailing list [email protected] http://lists.landley.net/listinfo.cgi/toybox-landley.net
