summaryrefslogtreecommitdiffstats
path: root/compat_err.c
Commit message (Collapse)AuthorAgeFilesLines
* Only compile compat_*.c implementations that are actually needed.Ingo Schwarze2020-06-151-10/+1
| | | | | That's cleaner and it is supposed to fix compiler warnings with gcc 10 reported by Wynn Wolf Arbor <wolf at oriole dot systems> on discuss@.
* No point in trying to go on when elementary database operationsIngo Schwarze2015-11-261-0/+12
| | | | | | like preparing queries or binding variables fail; that won't yield useful results anyway but may generate huge pointless error messages. Issue reported by deraadt@.
* Without HAVE_ERR, don't try to include <err.h>, it probably isn't there.Ingo Schwarze2015-11-071-1/+0
| | | | | In that case, the required prototypes are in "config.h". Patch from Peter Bray <pdb_ml at yahoo dot com dot au>.
* Use getprogname(3) rather than __progname.Ingo Schwarze2015-11-061-3/+1
| | | | | | | 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/+103
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...