aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/test-progname.c
Commit message (Collapse)AuthorAgeFilesLines
* Use getprogname(3) rather than __progname.Ingo Schwarze2015-11-061-4/+5
| | | | | | | Suggested by Joerg@ Sonnenberger (NetBSD). Last year, deraadt@ confirmed on tech@ that this "has the potential to be more portable", and micro-optimizing for speed is not relevant here. Also gets rid of one global variable.
* Finally use __progname, err(3) and warn(3).Ingo Schwarze2015-10-111-0/+9
That's more readable and less error-prone than fumbling around with argv[0], fprintf(3), strerror(3), perror(3), and exit(3). It's a bad idea to boycott good interfaces merely because standards committees ignore them. Instead, let's provide compatibility modules for archaic systems (like commercial Solaris) that still don't have them. The compat module has an UCB Copyright (c) 1993...