For the specific case of openssl:
It uses perror with only one exception for which I include a diff below.
It would be no hard to replace each perror(str) + exit(1) by err(1, str)
I don’t know which is better
Cheers
Index: openssl.c
===================================================================
RCS file: /cvs/src/usr.bin/openssl/openssl.c,v
retrieving revision 1.23
diff -u -p -r1.23 openssl.c
--- openssl.c 1 Dec 2015 12:01:56 -0000 1.23
+++ openssl.c 4 Apr 2016 03:16:08 -0000
@@ -439,7 +439,7 @@ main(int argc, char **argv)
arg.count = 0;
if (pledge("stdio inet dns rpath wpath cpath proc flock tty", NULL) ==
-1) {
- fprintf(stderr, "openssl: pledge: %s\n", strerror(errno));
+ perror("pledge");
exit(1);
}