another batch of [untested] hacks for libc :)