Commit History

Author SHA1 Message Date
  Rob Landley f3e56f4e4f Redo option parsing infrastructure so #define FORCE_FLAGS can unzero flag macros for a disabled command (needed when multiple commands share infrastructure with a common set of flags). 9 years ago
  Rob Landley de699accf6 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. 9 years ago
  Isaac Dunham 46ddf0e34b probe for getspnam(), forkpty(), utmpx, replace sethostname() 9 years ago
  Rob Landley d4bae7ddb7 xexec() recursion limiter has to go after rebound or toy_init() zeroes it. 9 years ago
  Rob Landley d97440cb60 Have OLDTOY emit (redundant) function prototype so single.sh can build OLDTOY standalone (if it has its own config symbol). 9 years ago
  Rob Landley c6705af423 Two problems: 1) Sometimes toy_exec() needs to re-exec to gain dropped root permissions, 2) shouldn't recurse forever without exec, stack depth increases and we may leak other resources. Limit it to ~5 levels. 9 years ago
  Rob Landley 89a62bf290 When locale is enabled, sprintf("%.123s", str) is counting characters, not bytes, so we can't globally enable locale without opening stack/heap smashing vulnerabilities. Make commands individually request setlocale() using TOYFLAGS instead. 10 years ago
  Rob Landley 1bc522424f Add generic_signal() handler, which sets toys.signal and writes byte to toys.signalfd if set. 10 years ago
  Rob Landley 4c2bd6277d Fix bug reported by Ashwini Sharma: rebound has to be at the end or toy_init() doesn't zero the rest of the struct. 10 years ago
  Isaac Dunham 9953f64c02 modprobe: cleanup, incorporate Ashwini's fix for alias loading 10 years ago
  Rob Landley 5b405827a2 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. 10 years ago
  Rob Landley 36aa7d7382 Add help -a (to show all commands) and -h (to produce HTML output). 10 years ago
  Rob Landley 98c322e881 Merge toynet.h into toys.h: musl supports it and micromanaging uClibc config options isn't very interesting anymore. 10 years ago
  Rob Landley 207cadacd3 Switch flag generation from shell to C. 10 years ago
  Rob Landley 8fdcfdb447 Introduce libbuf analogous to toybuf but for use by lib/*.c. Change readfile() semantics to be able to read into an existing buffer, or malloc its own if that's NULL. 10 years ago
  Strake 59bf7ce6a5 su: cleanery 11 years ago
  Rob Landley 982c38dd65 Forgot to check in toys.h when generated/oldtoys.h went in. (Oops.) 11 years ago
  Rob Landley 933919cd80 Fix some comments from way back when toybox first started (in 2006), when I was still cleaning busybox-isms out of my head... 11 years ago
  Rob Landley b1c002ac55 Add stat submission to new "pending" directory, along with infrastructure to support pending. 11 years ago
  Rob Landley 503c8b839d Add header that musl libc needs. 11 years ago
  Rob Landley 6cf0a11545 Cleanup i18n support (#ifdefectomy, move global init to process launch). Teach make.sh to emit "#define FLAG_x 0" for options inside disabled USE macros so we can unconditionally refer to them. 11 years ago
  Felix Janda 250e0055fe Make internalization support optional 11 years ago
  Rob Landley caf39c2682 Add rebound support to intercept error_exit() and longjmp instead. 11 years ago
  Rob Landley 7aa651a6a4 Reindent to two spaces per level. Remove vi: directives that haven't worked right in years (ubuntu broke its' vim implementation). Remove trailing spaces. Add/remove blank lines. Re-wordwrap in places. Update documentation with new coding style. 11 years ago
  Felix Janda abb8ca2455 wc -m only cares about counting characters. Attached is a try on implementing it and some test cases for it. The test cases are only for UTF-8 locales. 11 years ago
  Rob Landley c0e56edaf2 New build infrastructure to generate FLAG_ macros and TT alias, #define FOR_commandname before #including toys.h to trigger it. Rename DEFINE_GLOBALS() to just GLOBALS() (because I could never remember if it was DECLARE_GLOBALS). Convert existing commands to use new infrastructure, and replace optflag constants with FLAG_ macros where appropriate. 11 years ago
  Rob Landley 9c1c5ecd68 Replace TOY_LIST_LEN with more generic ARRAY_LEN() 12 years ago
  Elie De Brauwer 756f794bee Adding initial implementation of taskset 12 years ago
  Rob Landley 628eb9b220 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. 12 years ago
  Rob Landley e3b171e6df Georgi pointed out that some overly-pedantic C libraries require you to include both "string.h" and "strings.h". (Most don't.) 12 years ago