MySQL  8.0.18
Source Code Documentation
xcom_common.h File Reference
#include <limits.h>
#include "my_compiler.h"
#include "plugin/group_replication/libmysqlgcs/include/xcom/xcom.h"
#include <inttypes.h>

Go to the source code of this file.

Macros

#define __STDC_FORMAT_MACROS
 
#define number_is_valid_port(n)   ((n) > 0 && (n) <= (int)UINT16_MAX)
 
#define MAX(x, y)   ((x) > (y) ? (x) : (y))
 
#define MIN(x, y)   ((x) < (y) ? (x) : (y))
 
#define idx_check_ret(x, limit, ret)
 
#define idx_check_fail(x, limit)
 
#define BSD_COMP
 

Typedefs

typedef unsigned short xcom_port
 

Macro Definition Documentation

◆ __STDC_FORMAT_MACROS

#define __STDC_FORMAT_MACROS

◆ BSD_COMP

#define BSD_COMP

◆ idx_check_fail

#define idx_check_fail (   x,
  limit 
)
Value:
if (x < 0 || x >= limit) { \
g_critical("index out of range " #x " < 0 || " #x " >= " #limit " %s:%d", \
__FILE__, __LINE__); \
abort(); \
} else

◆ idx_check_ret

#define idx_check_ret (   x,
  limit,
  ret 
)
Value:
if (x < 0 || x >= limit) { \
g_critical("index out of range " #x " < 0 || " #x " >= " #limit " %s:%d", \
__FILE__, __LINE__); \
return ret; \
} else

◆ MAX

#define MAX (   x,
 
)    ((x) > (y) ? (x) : (y))

◆ MIN

#define MIN (   x,
 
)    ((x) < (y) ? (x) : (y))

◆ number_is_valid_port

#define number_is_valid_port (   n)    ((n) > 0 && (n) <= (int)UINT16_MAX)

Typedef Documentation

◆ xcom_port

typedef unsigned short xcom_port