Finally use __progname, err(3) and warn(3).
That's more readable and less error-prone than fumbling around
with argv[0], fprintf(3), strerror(3), perror(3), and exit(3).
It also shortens the code by 50 lines.
It's a bad idea to boycott good interfaces merely because standards
committees ignore them. Instead, it's the job of the portable
distribution to provide compatibility modules for archaic systems
(like commercial Solaris) that still don't have them. Actually,
the compat code for the portable distribution already exists and
will be committed right after this.