Keep track of the number of buffers undgoing IO, and include that number
[dfdiff.git] / lib / libbind / port_before.h
blob1b9dc4b1689d15006b51530a1b2ad59887cd3a1b
1 /* $DragonFly: src/lib/libbind/port_before.h,v 1.2 2006/09/20 21:48:39 victor Exp $ */
2 #ifndef port_before_h
3 #define port_before_h
4 #include <config.h>
6 struct group; /* silence warning */
7 struct passwd; /* silence warning */
8 struct timeval; /* silence warning */
9 struct timezone; /* silence warning */
11 #ifdef HAVE_SYS_TIMERS_H
12 #include <sys/timers.h>
13 #endif
14 #include <limits.h>
17 #undef WANT_IRS_GR
18 #undef WANT_IRS_NIS
19 #undef WANT_IRS_PW
21 #undef BSD_COMP
22 #undef SOLARIS2
24 #undef DO_PTHREADS
25 #define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
26 #define GETNETBYADDR_ADDR_T long
27 #define SETPWENT_VOID 1
28 #undef SETGRENT_VOID
30 #define NET_R_ARGS char *buf, int buflen
31 #define NET_R_BAD NULL
32 #define NET_R_COPY buf, buflen
33 #define NET_R_COPY_ARGS NET_R_ARGS
34 #define NET_R_END_RESULT(x) /*empty*/
35 #define NET_R_END_RETURN void
36 #undef NET_R_ENT_ARGS /*empty*/
37 #define NET_R_OK nptr
38 #define NET_R_RETURN struct netent *
39 #undef NET_R_SET_RESULT /*empty*/
40 #undef NET_R_SETANSWER
41 #define NET_R_SET_RETURN void
42 #undef NETENT_DATA
44 #define GROUP_R_RETURN struct group *
45 #define GROUP_R_SET_RETURN void
46 #undef GROUP_R_SET_RESULT /*empty*/
47 #define GROUP_R_END_RETURN void
48 #define GROUP_R_END_RESULT(x) /*empty*/
49 #define GROUP_R_ARGS char *buf, int buflen
50 #define GROUP_R_ENT_ARGS void
51 #define GROUP_R_OK gptr
52 #define GROUP_R_BAD NULL
54 #define HOST_R_ARGS char *buf, int buflen, int *h_errnop
55 #define HOST_R_BAD NULL
56 #define HOST_R_COPY buf, buflen
57 #define HOST_R_COPY_ARGS char *buf, int buflen
58 #define HOST_R_END_RESULT(x) /*empty*/
59 #define HOST_R_END_RETURN void
60 #undef HOST_R_ENT_ARGS /*empty*/
61 #define HOST_R_ERRNO *h_errnop = h_errno
62 #define HOST_R_OK hptr
63 #define HOST_R_RETURN struct hostent *
64 #undef HOST_R_SETANSWER
65 #undef HOST_R_SET_RESULT
66 #define HOST_R_SET_RETURN void
67 #undef HOSTENT_DATA
69 #define NGR_R_ARGS char *buf, int buflen
70 #define NGR_R_BAD (0)
71 #define NGR_R_COPY buf, buflen
72 #define NGR_R_COPY_ARGS NGR_R_ARGS
73 #define NGR_R_END_RESULT(x) /*empty*/
74 #define NGR_R_END_RETURN void
75 #undef NGR_R_ENT_ARGS /*empty*/
76 #define NGR_R_OK 1
77 #define NGR_R_RETURN int
78 #undef NGR_R_SET_RESULT /*empty*/
79 #define NGR_R_SET_RETURN void
82 #define PROTO_R_ARGS char *buf, int buflen
83 #define PROTO_R_BAD NULL
84 #define PROTO_R_COPY buf, buflen
85 #define PROTO_R_COPY_ARGS PROTO_R_ARGS
86 #define PROTO_R_END_RESULT(x) /*empty*/
87 #define PROTO_R_END_RETURN void
88 #undef PROTO_R_ENT_ARGS /*empty*/
89 #define PROTO_R_OK pptr
90 #undef PROTO_R_SETANSWER
91 #define PROTO_R_RETURN struct protoent *
92 #undef PROTO_R_SET_RESULT
93 #define PROTO_R_SET_RETURN void
95 #define PASS_R_ARGS char *buf, int buflen
96 #define PASS_R_BAD NULL
97 #define PASS_R_COPY buf, buflen
98 #define PASS_R_COPY_ARGS PASS_R_ARGS
99 #define PASS_R_END_RESULT(x) /*empty*/
100 #define PASS_R_END_RETURN void
101 #undef PASS_R_ENT_ARGS
102 #define PASS_R_OK pwptr
103 #define PASS_R_RETURN struct passwd *
104 #undef PASS_R_SET_RESULT /*empty*/
105 #define PASS_R_SET_RETURN void
107 #define SERV_R_ARGS char *buf, int buflen
108 #define SERV_R_BAD NULL
109 #define SERV_R_COPY buf, buflen
110 #define SERV_R_COPY_ARGS SERV_R_ARGS
111 #define SERV_R_END_RESULT(x) /*empty*/
112 #define SERV_R_END_RETURN void
113 #undef SERV_R_ENT_ARGS /*empty*/
114 #define SERV_R_OK sptr
115 #undef SERV_R_SETANSWER
116 #define SERV_R_RETURN struct servent *
117 #undef SERV_R_SET_RESULT
118 #define SERV_R_SET_RETURN void
121 #define DE_CONST(konst, var) \
122 do { \
123 union { const void *k; void *v; } _u; \
124 _u.k = konst; \
125 var = _u.v; \
126 } while (0)
128 #define UNUSED(x) (x) = (x)
130 #undef NEED_SOLARIS_BITTYPES
131 #define ISC_SOCKLEN_T socklen_t
133 #ifdef __GNUC__
134 #define ISC_FORMAT_PRINTF(fmt, args) \
135 __attribute__((__format__(__printf__, fmt, args)))
136 #else
137 #define ISC_FORMAT_PRINTF(fmt, args)
138 #endif
140 /* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
141 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
142 #include <sys/byteorder.h>
143 #endif
145 #endif