Remove dependency on skygw_utils.h
- STRERROR_BUFLEN moved to cdefs.h and renamed to MXS_STRERROR_BUFLEN. Better would be to provide a 'const char* mxs_strerror(int errno)' that would have a thread specific buffer for the error message. - MIN and MAX also moved to defs.h as MXS_MIN and MXS_MAX. - Now only mlist.h of the headers depend upon skygw_utils.h.
This commit is contained in:
@ -60,7 +60,7 @@ int setnonblocking(int fd)
|
||||
|
||||
if ((fl = fcntl(fd, F_GETFL, 0)) == -1)
|
||||
{
|
||||
char errbuf[STRERROR_BUFLEN];
|
||||
char errbuf[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Can't GET fcntl for %i, errno = %d, %s.",
|
||||
fd,
|
||||
errno,
|
||||
@ -70,7 +70,7 @@ int setnonblocking(int fd)
|
||||
|
||||
if (fcntl(fd, F_SETFL, fl | O_NONBLOCK) == -1)
|
||||
{
|
||||
char errbuf[STRERROR_BUFLEN];
|
||||
char errbuf[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Can't SET fcntl for %i, errno = %d, %s",
|
||||
fd,
|
||||
errno,
|
||||
@ -346,7 +346,7 @@ static bool mkdir_all_internal(char *path, mode_t mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
char err[STRERROR_BUFLEN];
|
||||
char err[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Failed to create directory '%s': %d, %s",
|
||||
path, errno, strerror_r(errno, err, sizeof(err)));
|
||||
}
|
||||
@ -355,7 +355,7 @@ static bool mkdir_all_internal(char *path, mode_t mask)
|
||||
}
|
||||
else
|
||||
{
|
||||
char err[STRERROR_BUFLEN];
|
||||
char err[MXS_STRERROR_BUFLEN];
|
||||
MXS_ERROR("Failed to create directory '%s': %d, %s",
|
||||
path, errno, strerror_r(errno, err, sizeof(err)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user