allocator: 'die' routine is now given requested size
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Jun 2011 08:15:18 +0000 (01:15 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 2 Jun 2011 08:15:18 +0000 (01:15 -0700)
commit686069051add46d5c552f4e34e005d49cad43529
tree41a408d7cb790e64504d0114f606eb0454d15fa2
parent63ce57e7e9fff1265da4e0a4d2639483c28b6b93
allocator: 'die' routine is now given requested size

* lib/allocator.h (struct allocator.die): New size arg.
* lib/careadlinkat.c (careadlinkat): Pass size to 'die' function.
If the actual problem is an ssize_t limitation, not a size_t or
malloc failure, fail with errno==ENAMETOOLONG instead of calling 'die'.
ChangeLog
lib/allocator.h
lib/careadlinkat.c