28 #define WIN32_LEAN_AND_MEAN
32 typedef int socklen_t;
35 #include <sys/types.h>
36 #include <sys/socket.h>
39 #include <netinet/in.h>
40 #include <arpa/inet.h>
45 #ifndef INET6_ADDRSTRLEN
46 #define INET6_ADDRSTRLEN 46
50 #if defined _WIN32 || defined __CYGWIN__
52 #define NRG_PUBLIC __declspec(dllexport)
54 #define NRG_PUBLIC __declspec(dllimport)
58 #define NRG_PUBLIC __attribute__ ((visibility ("default")))
59 #define NRG_PRIVATE __attribute__ ((visibility ("hidden")))
66 #define NRG_DEBUG(fmt, ...) do { fprintf(stderr, fmt, __VA_ARGS__); } while (0)
68 #define NRG_DEBUG(fmt, ...) do { } while(0)
Error-handling functionality.