This is Unofficial EPICS BASE Doxygen Site
epicsSocketConvertErrnoToString.cpp
Go to the documentation of this file.
1 /*************************************************************************\
2 * Copyright (c) 2002 The University of Chicago, as Operator of Argonne
3 * National Laboratory.
4 * Copyright (c) 2002 The Regents of the University of California, as
5 * Operator of Los Alamos National Laboratory.
6 * EPICS BASE is distributed subject to a Software License Agreement found
7 * in file LICENSE that is included with this distribution.
8 \*************************************************************************/
9 /* osdSock.c */
10 /*
11  * Author: Jeff Hill
12  * Date: 04-05-94
13  *
14  */
15 
16 #include <string.h>
17 
18 #include "osiSock.h"
19 
20 /*
21  * epicsSocketConvertErrorToString()
22  */
24  char * pBuf, unsigned bufSize, int theSockError )
25 {
26  if ( bufSize ) {
27  strncpy ( pBuf, strerror ( theSockError ), bufSize );
28  pBuf[bufSize-1] = '\0';
29  }
30 }
31 
32 /*
33  * epicsSocketConvertErrnoToString()
34  */
36  char * pBuf, unsigned bufSize )
37 {
38  epicsSocketConvertErrorToString ( pBuf, bufSize, SOCKERRNO );
39 }
void epicsSocketConvertErrnoToString(char *pBuf, unsigned bufSize)
#define SOCKERRNO
Definition: osdSock.h:33
void epicsSocketConvertErrorToString(char *pBuf, unsigned bufSize, int theSockError)