11 #define __unused __attribute__((__unused__))
15 #define __dead __attribute__((__noreturn__))
23 #define __UNCONST(a) ((void *)(intptr_t)(a))
27 #define __arraycount(a) (sizeof(a) / sizeof(a[0]))
31 size_t strlcpy(char *, const char *, size_t);
35 size_t strlcat(char *, const char *, size_t);
39 FILE *popenve(const char *, char *const *, char *const *, const char *);
41 #define pclose(a) pcloseve(a);
44 #ifndef HAVE_SOCKADDR_SNPRINTF
46 int sockaddr_snprintf(char *, size_t, const char *, const struct sockaddr
*);
50 intmax_t strtoi(const char *, char **, int, intmax_t, intmax_t, int *);
53 #ifndef HAVE_GETPROGNAME
54 const char *getprogname(void);
55 void setprogname(char *);
59 int pidfile(const char *);
63 #define FPARSELN_UNESCALL 0xf
64 #define FPARSELN_UNESCCOMM 0x1
65 #define FPARSELN_UNESCCONT 0x2
66 #define FPARSELN_UNESCESC 0x4
67 #define FPARSELN_UNESCREST 0x8
68 char *fparseln(FILE *, size_t *, size_t *, const char delim
[3], int);
72 char *fgetln(FILE *, size_t *);
75 #ifndef HAVE_CLOCK_GETTIME
77 int clock_gettime(int, struct timespec
*);
78 #define CLOCK_REALTIME 0
81 #define _PATH_BLCONF "conf"
82 #define _PATH_BLCONTROL "control"
83 #define _PATH_BLSOCK "blsock"
84 #define _PATH_BLSTATE "blacklistd.db"