Chapter Contents |
Previous |
Next |
Porting UNIX Socket Applications to the SAS/C Environment |
When
there is an error condition, most socket functions return a value of -1 and
set
errno
to a symbolic
value describing the nature of the error. The
perror
function prints a message that explains the error. The SAS/C
Library adheres as closely as possible to symbolic UNIX
errno
values. However, programs may not receive
exactly the same
errno
values as programs would in a particular implementation of the UNIX operating
system. The message printed by the
perror
function may also differ.
Because
errno
is a macro and not a simple external variable, you should always
declare it by including the
<errno.h>
header file.
Two external symbols,
h_errno
and
_res
,
are defined parts of the network database and resolver interfaces.
h_errno
values are the same as those in common
versions of the UNIX operating system, but the
herror
text may be different. As with
errno
, you cannot declare these symbols directly. Always declare them
by including the appropriate header file.
Chapter Contents |
Previous |
Next |
Top of Page |
Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.