461b90c341090c46083e83ca59ccb88371e051e4 |
|
04-Jan-2017 |
Elliott Hughes <enh@google.com> |
Fix dmesg -c and -C. I never use these, so I didn't notice I'd broken them until someone who does bringup complained. The "one weird trick" with SEEK_DATA is documented at the URL we already point to. SEEK_DATA was added in Linux 3.1 (2011) and isn't available in glibc 2.19 (2014), so I've added that to "portability.h" for the benefit of Ubuntu 14.04. Also make -c and -C mutually exclusive. Also fix some of the formatting I introduced earlier. (A clang-format file would help prevent these mistakes...)
/external/toybox/lib/portability.h
|
454eea52f806141137ff62abaf78302ea3d7c9c0 |
|
05-May-2016 |
Rob Landley <rob@landley.net> |
Simplify ps android scheduling policy fetch slightly.
/external/toybox/lib/portability.h
|
e0dbc6beaf376f1a84464e103661840178576b84 |
|
30-Apr-2016 |
Elliott Hughes <enh@google.com> |
Add a ps "PCY" field for Android scheduling policy.
/external/toybox/lib/portability.h
|
1c028ca33dc059a9d8f18daafcd77b5950268f41 |
|
09-Apr-2016 |
Rob Landley <rob@landley.net> |
Redefining basename_r to mean something random seems popular (bionic and freebsd both did it) so use getbasename instead.
/external/toybox/lib/portability.h
|
5a44e4ae3487cf033a99b81263cd07bf9951a6a2 |
|
02-Mar-2016 |
Rob Landley <rob@landley.net> |
The last-ever release of uClibc didn't #define MS_RELATIME.
/external/toybox/lib/portability.h
|
42cad120baa22bc043bcce6f5aac74fa26a01aef |
|
19-Feb-2016 |
Rob Landley <rob@landley.net> |
RLIMIT_RTTIME was added to the kernel in 2008, you can't expect uClibc to have noticed yet.
/external/toybox/lib/portability.h
|
2f3f26ea1ec581cd24a0778323eb0844f03fd6a3 |
|
10-Feb-2016 |
Rob Landley <rob@landley.net> |
Add ulimit. This isn't a shell builtin, it uses prlimit to target any pid (without -P it defaults to $PPID, so acts like historical ulimit by default).
/external/toybox/lib/portability.h
|
d3a435e53c94ec25b4ae5fa2614f49ef8884e08a |
|
06-Jan-2016 |
Rob Landley <rob@landley.net> |
Add error_msg_raw() and friends, replace error_msg("%s", s) uses, enable format checking, and fix up format checking complaints. Added out(type, value) function to stat to avoid a zillion printf typecasts.
/external/toybox/lib/portability.h
|
e96dd0716e5932625af9e8a91bfa3d989abe1fdb |
|
30-Aug-2015 |
Rob Landley <rob@landley.net> |
Add portability.h glue to let uptime build without TOYBOX_UTMPX.
/external/toybox/lib/portability.h
|
ba555808e068d9cc418b6b3bd6fa4238877a599d |
|
11-Jul-2015 |
Elliott Hughes <enh@google.com> |
Fix 32-bit bionic toybox build. https://android-review.googlesource.com/159035/
/external/toybox/lib/portability.h
|
c565b06325960a16ebf44afd8ae73f363775e58d |
|
18-May-2015 |
Rob Landley <rob@landley.net> |
More ls -Z upgrading. Move TOYBOX_SELINUX and TOYBOX_SMACK support from portability.h to new lib/lsm.h. Update ls.c to use it. Fix "ls . toys" (two directories when one is . or ..), which was filtering out the . as something we shouldn't recurse into even though it was explicitly listed on the command line. For some reason "ls -Z . toys" is still segfaulting though (but "ls -Z ." isn't), need to figure out why...
/external/toybox/lib/portability.h
|
72cd2e07f1cea190925021472465325e72589f47 |
|
09-May-2015 |
Rob Landley <rob@landley.net> |
Move not-curses code into interstingtimes.c
/external/toybox/lib/portability.h
|
9398f05d34453e9306f7a91993ee4c8fcf1102ec |
|
03-May-2015 |
Rob Landley <rob@landley.net> |
Move a prototype to the start of portability.h (suggested by Elliott Hughes)
/external/toybox/lib/portability.h
|
06d378325b9e7b6fd06fe45b284e189ac440345b |
|
01-May-2015 |
Rob Landley <rob@landley.net> |
Portability bits for the recent ls smack changes.
/external/toybox/lib/portability.h
|
58c326901827e1b54a7d82fb38633eafc448874d |
|
18-Apr-2015 |
Xavier Roche <xavier.roche@open.eurogiciel.org> |
Link against libattr and libsmack.
/external/toybox/lib/portability.h
|
08f51b53be06671f4bd6f57467182fd2b081b2c4 |
|
16-Apr-2015 |
Rob Landley <rob@landley.net> |
Put SELINUX in a a menu, and add config option for SMACK.
/external/toybox/lib/portability.h
|
eb4b1143b1f54a96002a83ea961d40d3169e1ae2 |
|
01-Mar-2015 |
Rob Landley <rob@landley.net> |
Only switch on printf format warnings for error_exit() and friends when TOYBOX_DEBUG enabled. One again gcc manages to be incompetent about producing warnings. For example, in bzcat we error_exit() with a message that's an error code fed into an array of string constants, and apparently dereferencing an array of string literals doesn't give you a string literal according to -Wformat-security. Not breaking the code to humor the compiler here, the compiler is wrong.
/external/toybox/lib/portability.h
|
1be99e695059ba7dbe44765f4b477f7e173e98d1 |
|
01-Mar-2015 |
Elliott Hughes <enh@google.com> |
let the compiler check format strings i'll be AFK for a week, so here's the patch i've been using this evening to find other format string mistakes. BSD uses __printflike and takes two arguments instead of hard-coding (1,2), but i figured that as long as you don't need the generality you'd prefer not to have it. and it's easy enough to retrofit if we ever do have a formatting function that takes other arguments.
/external/toybox/lib/portability.h
|
bd6c3f35ae226125737503dddac48e7924425b49 |
|
06-Feb-2015 |
Rob Landley <rob@landley.net> |
Alright, the Android guys agree with the musl guys: faccessat(AT_SYMLINK_NOFOLLOW) is not supported.
/external/toybox/lib/portability.h
|
468f155ecefec275e6d2299470d35bd912f69a94 |
|
18-Jan-2015 |
Rob Landley <rob@landley.net> |
Lift the basename/libgen.h shenanigans back out of portability.c and make it a static inline in portability.h, and prototype dirname() while we're at it.
/external/toybox/lib/portability.h
|
e910826c812fcde8d122990a1e43e17f46b6d03f |
|
18-Jan-2015 |
Elliott Hughes <enh@google.com> |
fix non-glibc basename(3) usage I considered a #else on the big #ifdef __GLIBC__ above, but that seemed harder to follow.
/external/toybox/lib/portability.h
|
0a4bd4b89f9a17e4ba8c7873d1384fb04f79b14d |
|
16-Jan-2015 |
Rob Landley <rob@landley.net> |
Move pty.h back to toys.h (under LSB 4.1 headers).
/external/toybox/lib/portability.h
|
c2415d16a8991e2192bda002baab840bfa4d5d79 |
|
16-Jan-2015 |
Elliott Hughes <enh@google.com> |
AOSP master has <pty.h> and builds netcat/nc.
/external/toybox/lib/portability.h
|
3b915991f8c8648f939498777f4d76aad04f2817 |
|
16-Jan-2015 |
Rob Landley <rob@landley.net> |
id.c #ifdefectomy. (ifdefs belong in headers, not in C code.)
/external/toybox/lib/portability.h
|
7e2af1c7489cbf974a57d482bb9d23c884d2aa49 |
|
16-Jan-2015 |
Elliott Hughes <enh@google.com> |
This patch adds a TOYBOX_SELINUX configuration option to control both the SELinux commands (such as chcon) and the SELinux-specific options to regular commands (such as ls -Z). This lets us #include <selinux/selinux.h> in portability.h. I've also fixed chcon to insist on being given the a context argument. This patch also adds -Z to id and fixes id's regular output (-G should be separated by spaces, non-G output should be separated by commas, and you don't want a double comma where the egid is omitted from the list of groups).
/external/toybox/lib/portability.h
|
de699accf6804e8b1d8042b46c85500ee8c672c6 |
|
31-Dec-2014 |
Rob Landley <rob@landley.net> |
When you include the posix header libgen.h, glibc #defines basename to some random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
/external/toybox/lib/portability.h
|
50fc9ed007b084883fb09c64866c45c571e70a99 |
|
05-Dec-2014 |
Rob Landley <rob@landley.net> |
Work with buildroot's extensively patched uClibc, and for nommu support move xfork() to portability.h and #ifdef based on __uClinux__ (which seems to be the nommu compiler define).
/external/toybox/lib/portability.h
|
f6c28b6e0017ac36190ee31132721a1c9e30f2b6 |
|
22-Nov-2014 |
Rob Landley <rob@landley.net> |
As long as Android's going to require fortify, fixup the warnings it generates.
/external/toybox/lib/portability.h
|
6a29bb1ebe62ada2dad5fb50f84f23a497cd677a |
|
22-Nov-2014 |
Elliott Hughes <enh@google.com> |
A patch against your current ToT that builds in AOSP master.
/external/toybox/lib/portability.h
|
69a9f257234a32b3aab2b0cdced8e898c940d3e9 |
|
21-Nov-2014 |
Rob Landley <rob@landley.net> |
Patch from Elliott Hughes for Android/bionic build.
/external/toybox/lib/portability.h
|
561478541dbeb92e2c82c2fda7b43461293938e9 |
|
19-Nov-2014 |
Rob Landley <rob@landley.net> |
Fixups for the android/bionic build probes patch. The CFG_* symbols are always defined so if() can use them as compile-time constants, so don't if defined() them. Doing USE_BLAH() around variable definitions opens up the same potential for config-dependent build breaks as #ifdefs do, just make the whole command depend on the symbol for now, factor out the utmpx infrastructure later. The PTY probe was always failing because it used NULL without #including the header that defines it. Substitute 0 instead.
/external/toybox/lib/portability.h
|
46ddf0e34b03f7711a9c80f7a70dc8cbf732f782 |
|
19-Nov-2014 |
Isaac Dunham <ibid.ag@gmail.com> |
probe for getspnam(), forkpty(), utmpx, replace sethostname() Android is missing all of these; we need to probe for some so we have a config symbol to depend on. sethostname() is easily replaced. We got termios.h via pty.h; now it's not included in configure-step tools, so we need termios.h to generate globals.
/external/toybox/lib/portability.h
|
2ccab0260f6812f78cc0bafdf2bb2a92942ee6f3 |
|
02-Oct-2014 |
Rob Landley <rob@landley.net> |
Workaround for musl's faccessat bug (the rm -r "error: is a directory" thing). The Linux man page says I can use AT_SYMLINK_NOFOLLOW. It works in glibc, uclibc, and klibc, but musl returns -EINVAL any time you pass in that flag and the maintainer says that's not a bug and insists the man page and those other libraries all change to match musl's behavior. Toybox uses it to avoid scheduling unnecessary metadata writes for things we're about to delete (have to chmod unreadable directories so we can descend into them to delete their contents, the chmod happens before we descend so the disk I/O has plenty of time to be scheduled) because the extra writes wear out SSD faster. It's just an optimization and I don't really care if it works _well_ (the fchmodat call _also_ takes AT_SYMLINK_NOFOLLOW so that's covered), but musl's behavior uniquely makes the check always error and thus breaks normal "rm -r". Yes this workaround is checking #ifdef __MUSL__ which the library does not supply (because its code is perfect and will thus never need to be worked around). You can CFLAGS=-D__MUSL__ if you don't echo "#define __MUSL__" >> include/features.h when installing the library.
/external/toybox/lib/portability.h
|
a1a83e671fdd91dcb763651ac86295c217574e6e |
|
21-Sep-2014 |
Rob Landley <rob@landley.net> |
Tweak portability.h for uClibc version in buildroot defconfig. I've been locally patching uClibc to not violate posix-2008 (you don't need to define a GNU macro to get a posix function), but uClibc is obsolete and moribund (development peaked in 2006, last bugfix release was over 2 years ago), and the largest remaining user (buildroot) doesn't bother to apply such a patch. Since even buildroot is slowly migrating to musl-libc, just do the portability tweak for what the last release of the old thing actually did.
/external/toybox/lib/portability.h
|
980458f62748d273a006da3ddcd2b619d44598ce |
|
06-Sep-2014 |
Rob Landley <rob@landley.net> |
Work around uClibc brain-damage.
/external/toybox/lib/portability.h
|
7eb3e4364c2bcebd2fdfef52c07f5101aa03e5bb |
|
12-Aug-2014 |
Ashwini Sharma <ak.ashwini1981@gmail.com> |
Patches to commands for issues reported from static analysis tool. portability.h.patch - it is for O_CLOEXEC, as compiler complained of it. Makefile.patch - for cleaning generated/*.o files and libopts.dat file [Fixup to uniq.c from Rob.]
/external/toybox/lib/portability.h
|
8fb779954829f923ee2935d81cd4446973aaa01f |
|
20-Jul-2014 |
Rob Landley <rob@landley.net> |
Add utf8 support to ls -C. Use wcwidth() instead of strlen(), and extend the -q substitution to also whiteout nonprintable characters that are nonparseable utf8 snippets.
/external/toybox/lib/portability.h
|
30e28cf7e166cf54b3a2a4fea5e6e134b5968812 |
|
06-May-2014 |
Rob Landley <rob@landley.net> |
Use compiler built-in macros to determine if argument parsing can use double or float for FLOAT arguments. (I.E. whether double fits in a long's memory.) Check in a way that the macros not being defined just gives us the shorter one.
/external/toybox/lib/portability.h
|
15027d6de049fa139a193abc5a86e6578faf630d |
|
16-Apr-2014 |
Rob Landley <rob@landley.net> |
Probes for O_NOFOLLOW that compile and run something aren't compatible with cross compiling, so just #define it to 0 if it's not in fcntl.h where posix-2008 says.
/external/toybox/lib/portability.h
|
5b405827a2fa4c928c488f3e7b0197dfec60dcc2 |
|
30-Mar-2014 |
Rob Landley <rob@landley.net> |
Group headers by standard (POSIX or LSB) or function (internationalization, networking). Move headers standards ignore (but which have been there >15 years) to lib/portability.h. Fold xregcomp into lib since it's posix.
/external/toybox/lib/portability.h
|
714a0db2ade17f61f09816f0f7067f14e049e645 |
|
28-Jan-2014 |
Isaac Dunham <ibid.ag@gmail.com> |
Two changes to shut up GCC: * __GLIBC__ was checked unconditionally; this made for a very messy build on musl. * int fd in chvt is always initialized; GCC 3.4 does not recognize this.
/external/toybox/lib/portability.h
|
10d55b112963406dec3164396b9e8378f6d63961 |
|
19-Dec-2013 |
Rob Landley <rob@landley.net> |
Only define MNT_DETACH for old glibc, portability.h included _before_ sys/mount.h...
/external/toybox/lib/portability.h
|
0201900cadbab691386298f195b1574a301c1b99 |
|
19-Dec-2013 |
Rob Landley <rob@landley.net> |
Regression test against Ancient Build Environment (Ubuntu 8.04), fixup bit-rot.
/external/toybox/lib/portability.h
|
25b043bff9de65abc0926c04053f3ba5ea8f30f7 |
|
12-Mar-2013 |
Rob Landley <rob@landley.net> |
Compile time probe to fish O_NOFOLLOW out of linux headers when fcntl doesn't conform to posix-2008.
/external/toybox/lib/portability.h
|
364d9ab6aa7fc6fb2b28147dd73d2183b15b45ae |
|
09-Mar-2013 |
Rob Landley <rob@landley.net> |
O_NOFOLLOW is specified by posix-2008 and varies by target, don't try to supply them for broken headers.
/external/toybox/lib/portability.h
|
9559c2c4a0e99975782fa283c77f5a22a50e1bff |
|
24-Feb-2013 |
Rob Landley <rob@landley.net> |
Comment updates and a policy statement about avoiding #define GNU_dammit
/external/toybox/lib/portability.h
|
44b9d043ccbe9a6e4bd2dbabe64a0854dbe5a7ac |
|
04-Feb-2013 |
Rob Landley <rob@landley.net> |
More support for old (~2008) build environments, move the #ifdef checks for symbols out of specific library version checks (shouldn't hurt anything), remove obsolete debug macro.
/external/toybox/lib/portability.h
|
ae9243aa425458eda4e3e0b8bc7dd8f19fc8113a |
|
15-Jan-2013 |
Rob Landley <rob@landley.net> |
Work around more random uClibc-specific breakage.
/external/toybox/lib/portability.h
|
62fd9d0b36d8f56a002ea88621b2f895ea55abb8 |
|
02-Dec-2012 |
Rob Landley <rob@landley.net> |
Fix ancient glibc workaround to force fstatat64
/external/toybox/lib/portability.h
|
9f8217ce73762c0ac4eea8e7ab2120ca6eb1361d |
|
27-Nov-2012 |
Rob Landley <rob@landley.net> |
The headers of uClibc and older glibc got unhappy with O_DIRECTORY and some other stuff. Fix it up in portability.h.
/external/toybox/lib/portability.h
|
bbda4efd9d7cda269d71ae99054e1ad2590d1b02 |
|
17-Nov-2012 |
Rob Landley <rob@landley.net> |
More touch cleanup to use generic infrastructure: use getdate() from libc, use flag macros, option parsing can collect argument strings in global block, use existing perror_* macros.
/external/toybox/lib/portability.h
|
4e79810a727d810b977dfeffb3ba654447a0b1fe |
|
13-Nov-2012 |
Rob Landley <rob@landley.net> |
Older versions of glibc predated posix-2008. They still provide most of what we need, but require a boot to the headers to get them to admit it. Note that uClibc lies and claims to be glibc so we have to specifically exclude it here.
/external/toybox/lib/portability.h
|
628eb9b22032fb0f2e343f43efa60ec52b01d345 |
|
16-Jun-2012 |
Rob Landley <rob@landley.net> |
More header fiddling: crypt.h is silly, SUSv4 requires crypt() to be prototyped in unistd.h. The fact glibc refuses to do so without a wacky #define is a glibc bug, treat it as such.
/external/toybox/lib/portability.h
|
ee00a7f4587c1b75dedb71b5aa3d12608fb7b54c |
|
20-Mar-2012 |
Rob Landley <rob@landley.net> |
Remove "feature test macros", replace non-portable fdprintf() with standard fprintf().
/external/toybox/lib/portability.h
|
522d90613ae7dc728a98d3ce3b939b4ad9b30f25 |
|
16-Mar-2012 |
Georgi Chorbadzhiyski <gf@unixsol.org> |
Implement Apple and Android versions of getline(), getdelim(), and clearenv().
/external/toybox/lib/portability.h
|
f05f660d9c4f18aa4702d723ed7b35f7053ce08c |
|
08-Mar-2012 |
Rob Landley <rob@landley.net> |
Consolidate headers.
/external/toybox/lib/portability.h
|
7051a963b0f646f0b489dba892d85e4816d95d79 |
|
06-Jan-2010 |
Rob Landley <rob@landley.net> |
Shut up even MORE gcc/glibc spurious warnings.
/external/toybox/lib/portability.h
|
efa93b987a355385d0b1a1ac4e3a0e25db63b494 |
|
16-Nov-2007 |
Rob Landley <rob@landley.net> |
Add noreturn mark to [p]error_exit(), suggested by Charlie Shepherd.
/external/toybox/lib/portability.h
|
2aa494dcfe701e080e62f3d2a36af84b2ee16837 |
|
13-Feb-2007 |
Rob Landley <rob@landley.net> |
MacOS X has a defective sed with no -r.
/external/toybox/lib/portability.h
|
fd1c5ba0cbbd31c4713d9283c4fa5c3265ad2296 |
|
03-Feb-2007 |
Rob Landley <rob@landley.net> |
Teach build to build only the toys/*.c selected in .config, and teach CFG_TOYSH_DEBUG to shut up the spurious "gcc can't tell that this is never actually used uninitialized because gcc is stupid" warnings.
/external/toybox/lib/portability.h
|
901637760b4206e968e73dd5ff7430c107c27b57 |
|
19-Jan-2007 |
Rob Landley <rob@landley.net> |
Add fdprintf(). Remove reread() and rewrite() which handle -EINTR, which shouldn't be a problem if we register signal handlers with sigaction(SA_RESTART) Straighten out count and len (I generally consistently use "count" for the current progress and "len" for the total, but this time I got them backwards for some reason and don't want to confuse myself in future.)
/external/toybox/lib/portability.h
|
055cfcbe5b0534c700b30216f54336b7581f7be4 |
|
15-Jan-2007 |
Rob Landley <rob@landley.net> |
Add start of mke2fs/gene2fs, and some other stuff I've been working on.
/external/toybox/lib/portability.h
|