Now <utmpx.h> isn't any more useful on Android than <utmp.h> is, but it
is POSIX, and -- importantly -- we can implement it with just a header
file, so code can use it on every existing API level.
macOS does indeed only have the <utmpx.h> functions (although it does
still have the <utmp.h> header!), so potentially portable code might
want <utmpx.h> on Android. (glibc/musl both have both headers.)
Bug: https://github.com/landley/toybox/pull/213
Test: treehugger
Change-Id: Iaa88167708182009a63e2e1a15f11186b251ed02
Now we're being marked down for our poor coverage, we may as well remove
more broken cruft. Despite the amount of effort that seems to have gone
into pututline(), it wasn't working with the other utmp.h functions (in
particular, utmpname()), and wasn't declared in the header file!
Test: treehugger
Change-Id: I1a583984189c751168c11c01431433f96f8c548b
If we're going to keep this useless header -- and I think it's too late to
remove it -- it may as well be correct.
Bug: http://b/17700469
Change-Id: Ifec4f8f1a984483d7fa7d81d47786f75b70ff4ba
This fills out the defines that utmp.h normally offers on other systems
such as glibc.
BUG=24810744
Change-Id: If57f9ced22e8673f072245fce3f5c0f8e1f591e5
Based on the package/apps/Terminal implementation. I'll switch them over
shortly. This also lets us build the toybox version of netcat.
Change-Id: Ia922a100141a67409264b43b937eeca07b21f344
Increase (UT_NAMESIZE,UT_LINESIZE,UT_HOSTSIZE) to (32,32,256).
Nobody writes utmp on Android but it would be nice to be aligned
with others who use 32,32,256 (like glibc). If ever used it will produce
nicer logging. There is no consensus in BSDs for these values.
Bug: 14584341
Bug: 12875898
Change-Id: I94af10b982b8f9fcaea897c4cf968563f38403f9