iscontrol(8): Fix synopsis, sync usage() & improve markup
[dragonfly.git] / lib / libbind / port_before.h
blobb28d17bf8acf4833a0b9caa9fff4b78e3f2fd3e7
1 /* $DragonFly: src/lib/libbind/port_before.h,v 1.3 2008/05/19 10:19:49 corecode 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>
15 #include <sys/select.h>
18 #undef WANT_IRS_GR
19 #undef WANT_IRS_NIS
20 #undef WANT_IRS_PW
22 #undef BSD_COMP
23 #undef SOLARIS2
25 #undef DO_PTHREADS
26 #define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
27 #define GETNETBYADDR_ADDR_T long
28 #define SETPWENT_VOID 1
29 #undef SETGRENT_VOID
31 #define NET_R_ARGS char *buf, int buflen
32 #define NET_R_BAD NULL
33 #define NET_R_COPY buf, buflen
34 #define NET_R_COPY_ARGS NET_R_ARGS
35 #define NET_R_END_RESULT(x) /*empty*/
36 #define NET_R_END_RETURN void
37 #undef NET_R_ENT_ARGS /*empty*/
38 #define NET_R_OK nptr
39 #define NET_R_RETURN struct netent *
40 #undef NET_R_SET_RESULT /*empty*/
41 #undef NET_R_SETANSWER
42 #define NET_R_SET_RETURN void
43 #undef NETENT_DATA
45 #define GROUP_R_RETURN struct group *
46 #define GROUP_R_SET_RETURN void
47 #undef GROUP_R_SET_RESULT /*empty*/
48 #define GROUP_R_END_RETURN void
49 #define GROUP_R_END_RESULT(x) /*empty*/
50 #define GROUP_R_ARGS char *buf, int buflen
51 #define GROUP_R_ENT_ARGS void
52 #define GROUP_R_OK gptr
53 #define GROUP_R_BAD NULL
55 #define HOST_R_ARGS char *buf, int buflen, int *h_errnop
56 #define HOST_R_BAD NULL
57 #define HOST_R_COPY buf, buflen
58 #define HOST_R_COPY_ARGS char *buf, int buflen
59 #define HOST_R_END_RESULT(x) /*empty*/
60 #define HOST_R_END_RETURN void
61 #undef HOST_R_ENT_ARGS /*empty*/
62 #define HOST_R_ERRNO *h_errnop = h_errno
63 #define HOST_R_OK hptr
64 #define HOST_R_RETURN struct hostent *
65 #undef HOST_R_SETANSWER
66 #undef HOST_R_SET_RESULT
67 #define HOST_R_SET_RETURN void
68 #undef HOSTENT_DATA
70 #define NGR_R_ARGS char *buf, int buflen
71 #define NGR_R_BAD (0)
72 #define NGR_R_COPY buf, buflen
73 #define NGR_R_COPY_ARGS NGR_R_ARGS
74 #define NGR_R_END_RESULT(x) /*empty*/
75 #define NGR_R_END_RETURN void
76 #undef NGR_R_ENT_ARGS /*empty*/
77 #define NGR_R_OK 1
78 #define NGR_R_RETURN int
79 #undef NGR_R_SET_RESULT /*empty*/
80 #define NGR_R_SET_RETURN void
83 #define PROTO_R_ARGS char *buf, int buflen
84 #define PROTO_R_BAD NULL
85 #define PROTO_R_COPY buf, buflen
86 #define PROTO_R_COPY_ARGS PROTO_R_ARGS
87 #define PROTO_R_END_RESULT(x) /*empty*/
88 #define PROTO_R_END_RETURN void
89 #undef PROTO_R_ENT_ARGS /*empty*/
90 #define PROTO_R_OK pptr
91 #undef PROTO_R_SETANSWER
92 #define PROTO_R_RETURN struct protoent *
93 #undef PROTO_R_SET_RESULT
94 #define PROTO_R_SET_RETURN void
96 #define PASS_R_ARGS char *buf, int buflen
97 #define PASS_R_BAD NULL
98 #define PASS_R_COPY buf, buflen
99 #define PASS_R_COPY_ARGS PASS_R_ARGS
100 #define PASS_R_END_RESULT(x) /*empty*/
101 #define PASS_R_END_RETURN void
102 #undef PASS_R_ENT_ARGS
103 #define PASS_R_OK pwptr
104 #define PASS_R_RETURN struct passwd *
105 #undef PASS_R_SET_RESULT /*empty*/
106 #define PASS_R_SET_RETURN void
108 #define SERV_R_ARGS char *buf, int buflen
109 #define SERV_R_BAD NULL
110 #define SERV_R_COPY buf, buflen
111 #define SERV_R_COPY_ARGS SERV_R_ARGS
112 #define SERV_R_END_RESULT(x) /*empty*/
113 #define SERV_R_END_RETURN void
114 #undef SERV_R_ENT_ARGS /*empty*/
115 #define SERV_R_OK sptr
116 #undef SERV_R_SETANSWER
117 #define SERV_R_RETURN struct servent *
118 #undef SERV_R_SET_RESULT
119 #define SERV_R_SET_RETURN void
122 #define DE_CONST(konst, var) \
123 do { \
124 union { const void *k; void *v; } _u; \
125 _u.k = konst; \
126 var = _u.v; \
127 } while (0)
129 #define UNUSED(x) (x) = (x)
131 #undef NEED_SOLARIS_BITTYPES
132 #define ISC_SOCKLEN_T socklen_t
134 #ifdef __GNUC__
135 #define ISC_FORMAT_PRINTF(fmt, args) \
136 __attribute__((__format__(__printf__, fmt, args)))
137 #else
138 #define ISC_FORMAT_PRINTF(fmt, args)
139 #endif
141 /* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
142 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
143 #include <sys/byteorder.h>
144 #endif
146 #endif