On Sat, Nov 03, 2007 at 12:23:16AM +0100, Jim Meyering wrote:
> This is not totally fair, because while I made mmap64 return -1,
> I did not set errno, which would normally happen for a real failure.
> I tried, but __errno_location() returns an invalid address.
FYI, try ((int * (*) ()) __errno_loc
Jim Meyering wrote:
> Unfortunately, you may well have to use xprintf much more generally,
> (or else check all *printf return values) if you care about robustness
> under low-memory conditions.
Yes, it's not only FreeBSD 5 and NetBSD 3 which are affected by this
problem, but also FreeBSD 6, MacOS
Unfortunately, you may well have to use xprintf much more generally,
(or else check all *printf return values) if you care about robustness
under low-memory conditions.
This is because the printf, fputs, fwrite, etc. functions
(at least glibc-based functions) always allocate memory upon
stream ini