Go to the documentation of this file.
36 #define INT_TO_POINTER(i) (void *) i
37 #define POINTER_TO_INT(p) *((int *) (p))
40 #define ZERO_STRUCT(x) memset((char *)&(x), 0, sizeof(x))
43 #define ZERO_STRUCTP(x) do { if ((x) != NULL) memset((char *)(x), 0, sizeof(*(x))); } while(0)
46 #define SAFE_FREE(x) do { if ((x) != NULL) {free((void*)x); x=NULL;} } while(0)
49 #define MIN(a,b) ((a) < (b) ? (a) : (b))
52 #define MAX(a,b) ((a) < (b) ? (b) : (a))
55 #define ARRAY_SIZE(a) (sizeof(a)/sizeof(a[0]))
58 #define C_STRERROR(errno, buf, size) if(strerror_r(errno, buf, size)) {}
73 #define ENOBUFS WSAENOBUFS