This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
RE: tcp_wrappers
- To: <jacek at certum dot pl>
- Subject: RE: tcp_wrappers
- From: "Norman Vine" <nhv at cape dot com>
- Date: Tue, 27 Mar 2001 09:27:22 -0500
- Cc: <cygwin at cygwin dot com>
- Reply-To: <nhv at cape dot com>
Jacek Trzcinski writes:
>
>
>this was:
>
>if (errno < sys_nerr && errno > 0)
>{
>strcpy(bp, sys_errlist[errno]);
>} else
>{
>sprintf(bp, "Unknown error %d", errno);
>}
>
>
>I had to change to:
>
>if (errno < _sys_nerr && errno > 0)
>{
>strcpy(bp, _sys_errlist[errno]);
>} else
>{
>sprintf(bp, "Unknown error %d", errno);
>}
>Does anybody know it can be made simpler ( with minimal changes). It
>seems to be typical names problem. This changes I made looking at
>libcygwin.a
>and watching what are correct names of needed variables.
sure forget about the non-ANSII sys_errlist stuff
and just do
#include <errno.h>
#include <string.h>
if( errno )
strcpy( bp, strerror(errno));
Cheers
Norman Vine
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple