This is to avoid redefining prototypes from the libc headers. Also, simplify the autoconf function checks and remove some copy/paste errors checking for 'write'. ok wouter@