diff options
| author | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:19:03 +0900 |
|---|---|---|
| committer | beatrice <beatrice@dangofactory.net> | 2026-11-22 19:19:03 +0900 |
| commit | bd4611555e18fca7c66afaef0f094e15038b0459 (patch) | |
| tree | 1b1a9109567b61ac259ead146f4bef21a0f886df /src/util/mystrerror.c | |
| parent | 2324a9e97a727bf95690c9fb8fdca0f52301940e (diff) | |
| download | postfix-master.tar.gz postfix-master.zip | |
Release tarball postfix-3.11.7.tar.gz (dist-generated files / local differences from tag)HEADlocal/postfixmaster
Diffstat (limited to 'src/util/mystrerror.c')
| -rw-r--r-- | src/util/mystrerror.c | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/util/mystrerror.c b/src/util/mystrerror.c new file mode 100644 index 000000000..0de07f124 --- /dev/null +++ b/src/util/mystrerror.c @@ -0,0 +1,39 @@ +/*++ +/* NAME +/* mystrerror 3 +/* SUMMARY +/* convert error number to string +/* SYNOPSIS +/* #include <stringops.h> +/* +/* const char *mystrerror() +/* int errnum) +/* DESCRIPTION +/* mystrerror() maps an error number to string. Unlike strerror(3) +/* it returns "Application error" instead of "Success". +/* LICENSE +/* .ad +/* .fi +/* The Secure Mailer license must be distributed with this software. +/* AUTHOR(S) +/* Wietse Venema +/* porcupine.org +/*--*/ + + /* + * System library. + */ +#include <sys_defs.h> +#include <string.h> + + /* + * Utility library. + */ +#include <stringops.h> + +/* mystrerror - convert error number to string */ + +const char *mystrerror(int errnum) +{ + return (errnum ? strerror(errnum) : "Application error"); +} |
