Print this page
1666 libwrap is 32bit only
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: Garrett D'Amore <garrett.damore@dey-sys.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>

*** 1,11 **** /* * Copyright 2001 Sun Microsystems, Inc. All rights reserved. * Use is subject to license terms. */ - #pragma ident "%Z%%M% %I% %E% SMI" - /* * Replace %m by system error message. * * Author: Wietse Venema, Eindhoven University of Technology, The Netherlands. */ --- 1,9 ----
*** 17,30 **** #include <stdio.h> #include <errno.h> #include <string.h> extern int errno; - #ifndef SYS_ERRLIST_DEFINED - extern char *sys_errlist[]; - extern int sys_nerr; - #endif #include "mystdarg.h" char *percent_m(obuf, ibuf) char *obuf; --- 15,24 ----
*** 33,47 **** char *bp = obuf; char *cp = ibuf; while (*bp = *cp) if (*cp == '%' && cp[1] == 'm') { ! if (errno < sys_nerr && errno > 0) { ! strcpy(bp, sys_errlist[errno]); ! } else { ! sprintf(bp, "Unknown error %d", errno); ! } bp += strlen(bp); cp += 2; } else { bp++, cp++; } --- 27,37 ---- char *bp = obuf; char *cp = ibuf; while (*bp = *cp) if (*cp == '%' && cp[1] == 'm') { ! strcpy(bp, strerror(errno)); bp += strlen(bp); cp += 2; } else { bp++, cp++; }