aboutsummaryrefslogtreecommitdiff
path: root/lib/portability.c
AgeCommit message (Collapse)Author
2019-04-21Shouldn't need clearenv() for macosx now we've got xclearenv.Rob Landley
2019-01-08FreeBSD will use the getmntinfo API as with AppleEd Maste
2018-12-07Forgot to check the portability.? changes. (Oops.)Rob Landley
2018-12-04macOS: move getmountlist.c functions into portability.c.Elliott Hughes
I think this was the preferred option for this code that turns out to be very different on Linux vs BSD. I don't yet have a BSD implementation, and I'm not likely to have chance to work on one in the near future, so this just #ifdefs it out for macOS right now. With this (and a suitably minimal .config), toybox builds for macOS out of the box.
2018-11-30macOS: remove unnecessary <stdio.h> workarounds.Elliott Hughes
These were added in macOS 10.7 in 2011-07, so the seven year rule applies...
2018-08-03xgetrandom: use getrandom result if it succeedsPatrick Oppenlander
2018-07-13Fix typo in a macro nameKonst Mayer
2018-07-06Bionic ships newer libc with older kernels, so Android needs to fallback atRob Landley
runtime for ENOSYS.
2018-07-04Add xgetrandom() with probe for new system call (else open/read /dev/{,u}random)Rob Landley
2018-01-01xphung on github said: "config2help currently doesn't work on OS X, itRob Landley
terminates parsing of Config.in at first blank line. This is because getdelim() in portability.c returns -1 whenever the line comprises only a single linefeed character. Fixing this was a trivial change to two lines (see below), and config2help now works on OS X but I haven't regression tested this on any other commands which rely on getdelim()"
2016-05-04Simplify ps android scheduling policy fetch slightly.Rob Landley
2016-04-30Add a ps "PCY" field for Android scheduling policy.Elliott Hughes
2015-07-03Probe for fork() instead of relying on a distro-specific #define.Rob Landley
2015-03-21Patch from David Halls to fix mac/ios portability issue.Rob Landley
2015-01-18Lift the basename/libgen.h shenanigans back out of portability.c and make it ↵Rob Landley
a static inline in portability.h, and prototype dirname() while we're at it.
2014-12-31When you include the posix header libgen.h, glibc #defines basename to some ↵Rob Landley
random other symbol name (because gnu) and this screws up nontrivial macro expansions of NEWTOY(basename), so work around it in portability.h.
2014-12-04Work with buildroot's extensively patched uClibc, and for nommu support move ↵Rob Landley
xfork() to portability.h and #ifdef based on __uClinux__ (which seems to be the nommu compiler define).
2014-11-21A patch against your current ToT that builds in AOSP master.Elliott Hughes
2014-11-21Don't include asm/* files directly.Rob Landley
2014-11-19probe for getspnam(), forkpty(), utmpx, replace sethostname()Isaac Dunham
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.
2012-11-13Reindent to two spaces per level. Remove vi: directives that haven't worked ↵Rob Landley
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. The actual code should be the same afterward, this is just cosmetic refactoring.
2012-03-16Implement Apple and Android versions of getline(), getdelim(), and clearenv().Georgi Chorbadzhiyski