diff options
Diffstat (limited to '')
-rw-r--r-- | doc/man/libhaiku_perror.3 | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/doc/man/libhaiku_perror.3 b/doc/man/libhaiku_perror.3 index 7c0476d..1514470 100644 --- a/doc/man/libhaiku_perror.3 +++ b/doc/man/libhaiku_perror.3 @@ -33,7 +33,18 @@ Unlike .B libhaiku_perror shall not print anything if .B errno -is zero. +is zero. If you rather it did, you can use the macro +.PP +.nf +#define libhaiku_perror(s) \\ + do { \\ + const char *s__ = (s); \\ + if (errno && s__) \\ + perror(s__); \\ + errno = errno ? errno : -1; \\ + libhaiku_perror(s__); \\ + } while (0) +.fi .SH "SEE ALSO" .BR libhaiku (7), .BR perror (3) |