diff options
Diffstat (limited to 'util.h')
-rw-r--r-- | util.h | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -3,6 +3,9 @@ #include <sys/socket.h> +#define PTHREAD_CHECK(func_,...) do { int ret=(func_)(__VA_ARGS__); if(ret!=0){ fprintf(stderr,#func_ ": %s\n",strerror(ret)); exit(1); } } while(0) + + char* copy_buf(const char *buf,int len); char* copy_str(const char *str); |