<div dir="ltr">(in the hope that silence means you don't hate the idea, i'll send a patch implementing this...)</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 28, 2018 at 8:05 PM enh <<a href="mailto:enh@google.com">enh@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">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?<div dir="auto"><br></div><div dir="auto">Or are there actually a large number of these missing?</div><div dir="auto"><br></div><div dir="auto">___</div><div dir="auto">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...</div></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 28, 2018, 14:41 enh <<a href="mailto:enh@google.com" target="_blank">enh@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">$ ./toybox getconf NPROCESSORS_CONF NPROCESSORS_ONLN<br>
48<br>
2097152<br>
<br>
seems like this isn't working:<br>
<br>
# Extract names, remove blank lines, filter, replace unknown #defines<br>
# with UNKNOWN<br>
sed -n "/char [*]${1}_names[[]/"',/^}/s/[^"]*"\([^"]*\) *",*/\1\n/pg' \<br>
toys/posix/getconf.c | grep -v '^$' | $2 |<br>
sed -e "$DEFINES" -e "t;d;a UNKNOWN" | xargs | tr ' ' ',' &&<br>
echo '};'<br>
<br>
glibc doesn't have an _XOPEN_UUCP but instead of the promised UNKNOWN,<br>
everything after that is just off-by-one...<br>
</blockquote></div>
</blockquote></div>