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:
Johan Wikman
2016-10-14 15:38:16 +03:00
parent bff2cfb7e5
commit 03dbc6df80
51 changed files with 215 additions and 199 deletions

View File

@ -1051,7 +1051,7 @@ execute_cmd(CLI_SESSION *cli)
}
}
*lptr = 0;
args[MIN(MAXARGS - 1, i + 1)] = NULL;
args[MXS_MIN(MAXARGS - 1, i + 1)] = NULL;
if (args[0] == NULL || *args[0] == 0)
{
@ -1964,9 +1964,9 @@ static void fail_accept(
char* arg1,
char* arg2)
{
int failcount = MIN(atoi(arg2), 100);
int failcount = MXS_MIN(atoi(arg2), 100);
fail_accept_errno = atoi(arg1);
char errbuf[STRERROR_BUFLEN];
char errbuf[MXS_STRERROR_BUFLEN];
switch(fail_accept_errno) {
case EAGAIN: