30 #include "ortp/event.h"
41 #define o_list_next(elem) ((elem)->next)
43 OList * o_list_append(
OList *elem,
void * data);
44 OList * o_list_remove(
OList *list,
void *data);
49 #define MIN(a,b) (((a)>(b)) ? (b) : (a))
52 #define MAX(a,b) (((a)>(b)) ? (a) : (b))
55 #define return_if_fail(expr) if (!(expr)) {printf("%s:%i- assertion"#expr "failed\n",__FILE__,__LINE__); return;}
56 #define return_val_if_fail(expr,ret) if (!(expr)) {printf("%s:%i- assertion" #expr "failed\n",__FILE__,__LINE__); return (ret);}
59 #define INT_TO_POINTER(truc) ((long)(long)(truc))
60 #define POINTER_TO_INT(truc) ((int)(long)(truc))
80 #define hton24(x) ((( (x) & 0x00ff0000) >>16) | (( (x) & 0x000000ff) <<16) | ( (x) & 0x0000ff00) )
82 #define ntoh24(x) hton24(x)
84 #if defined(WIN32) || defined(_WIN32_WCE)
85 #define is_would_block_error(errnum) (errnum==WSAEWOULDBLOCK)
87 #define is_would_block_error(errnum) (errnum==EWOULDBLOCK || errnum==EAGAIN)
92 uint64_t ortp_timeval_to_ntp(
const struct timeval *tv);
Definition: str_utils.h:28