etc/services - sync with NetBSD-8
[minix.git] / external / bsd / blacklist / port / port.h
blob41ccc556c42aa2eb8609bdb8c4efc56a579db2e5
1 #ifndef _GNU_SOURCE
2 #define _GNU_SOURCE
3 #endif
4 #include <stdio.h>
5 #include <inttypes.h>
6 #include <time.h>
7 #include <sys/stat.h>
8 #include <netdb.h>
10 #ifndef __unused
11 #define __unused __attribute__((__unused__))
12 #endif
14 #ifndef __dead
15 #define __dead __attribute__((__noreturn__))
16 #endif
18 #ifndef __RCSID
19 #define __RCSID(a)
20 #endif
22 #ifndef __UNCONST
23 #define __UNCONST(a) ((void *)(intptr_t)(a))
24 #endif
26 #ifndef __arraycount
27 #define __arraycount(a) (sizeof(a) / sizeof(a[0]))
28 #endif
30 #ifndef HAVE_STRLCPY
31 size_t strlcpy(char *, const char *, size_t);
32 #endif
34 #ifndef HAVE_STRLCAT
35 size_t strlcat(char *, const char *, size_t);
36 #endif
38 #ifndef HAVE_POPENVE
39 FILE *popenve(const char *, char *const *, char *const *, const char *);
40 int pcloseve(FILE *);
41 #define pclose(a) pcloseve(a);
42 #endif
44 #ifndef HAVE_SOCKADDR_SNPRINTF
45 struct sockaddr;
46 int sockaddr_snprintf(char *, size_t, const char *, const struct sockaddr *);
47 #endif
49 #ifndef HAVE_STRTOI
50 intmax_t strtoi(const char *, char **, int, intmax_t, intmax_t, int *);
51 #endif
53 #ifndef HAVE_GETPROGNAME
54 const char *getprogname(void);
55 void setprogname(char *);
56 #endif
58 #ifndef HAVE_PIDFILE
59 int pidfile(const char *);
60 #endif
62 #ifndef HAVE_FPARSELN
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);
69 #endif
71 #ifndef HAVE_FGETLN
72 char *fgetln(FILE *, size_t *);
73 #endif
75 #ifndef HAVE_CLOCK_GETTIME
76 struct timespec;
77 int clock_gettime(int, struct timespec *);
78 #define CLOCK_REALTIME 0
79 #endif
81 #define _PATH_BLCONF "conf"
82 #define _PATH_BLCONTROL "control"
83 #define _PATH_BLSOCK "blsock"
84 #define _PATH_BLSTATE "blacklistd.db"