Import bind 9.5.2 vendor sources.
[dragonfly.git] / contrib / bind-9.5.2 / lib / bind / port_before.h.in
1 /*
2  * Copyright (C) 2005-2008  Internet Systems Consortium, Inc. ("ISC")
3  * Copyright (C) 2001  Internet Software Consortium.
4  *
5  * Permission to use, copy, modify, and/or distribute this software for any
6  * purpose with or without fee is hereby granted, provided that the above
7  * copyright notice and this permission notice appear in all copies.
8  *
9  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
10  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
11  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
12  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
13  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
14  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
15  * PERFORMANCE OF THIS SOFTWARE.
16  */
17
18 /* $Id: port_before.h.in,v 1.27.128.3 2008/02/28 05:46:12 marka Exp $ */
19
20 #ifndef port_before_h
21 #define port_before_h
22 #include <config.h>
23
24 #ifdef NEED_SUN4PROTOS
25 #define _PARAMS(x) x
26 #endif
27
28 struct group;           /* silence warning */
29 struct passwd;          /* silence warning */
30 struct timeval;         /* silence warning */
31 struct timezone;        /* silence warning */
32
33 #ifdef HAVE_SYS_TIMERS_H
34 #include <sys/timers.h>
35 #endif
36 #include <limits.h>
37
38 #ifdef ISC_PLATFORM_NEEDTIMESPEC
39 #include <time.h>               /* For time_t */
40 struct timespec {
41         time_t  tv_sec;         /* seconds */
42         long    tv_nsec;        /* nanoseconds */
43 };
44 #endif
45 #ifndef HAVE_MEMMOVE
46 #define memmove(a,b,c) bcopy(b,a,c)
47 #endif
48
49 @WANT_IRS_GR@
50 @WANT_IRS_NIS@
51 @WANT_IRS_PW@
52
53 @BSD_COMP@
54 @USE_POLL@
55 @HAVE_MD5@
56 @SOLARIS2@
57
58 @DO_PTHREADS@
59 @GETGROUPLIST_ARGS@
60 @GETNETBYADDR_ADDR_T@
61 @SETPWENT_VOID@
62 @SETGRENT_VOID@
63
64 @NET_R_ARGS@
65 @NET_R_BAD@
66 @NET_R_COPY@
67 @NET_R_COPY_ARGS@
68 @NET_R_END_RESULT@
69 @NET_R_END_RETURN@
70 @NET_R_ENT_ARGS@
71 @NET_R_OK@
72 @NET_R_RETURN@
73 @NET_R_SET_RESULT@
74 @NET_R_SETANSWER@
75 @NET_R_SET_RETURN@
76 @NETENT_DATA@
77
78 @GROUP_R_RETURN@
79 @GROUP_R_SET_RETURN@
80 @GROUP_R_SET_RESULT@
81 @GROUP_R_END_RETURN@
82 @GROUP_R_END_RESULT@
83 @GROUP_R_ARGS@
84 @GROUP_R_ENT_ARGS@
85 @GROUP_R_OK@
86 @GROUP_R_BAD@
87
88 @HOST_R_ARGS@
89 @HOST_R_BAD@
90 @HOST_R_COPY@
91 @HOST_R_COPY_ARGS@
92 @HOST_R_END_RESULT@
93 @HOST_R_END_RETURN@
94 @HOST_R_ENT_ARGS@
95 @HOST_R_ERRNO@
96 @HOST_R_OK@
97 @HOST_R_RETURN@
98 @HOST_R_SETANSWER@
99 @HOST_R_SET_RESULT@
100 @HOST_R_SET_RETURN@
101 @HOSTENT_DATA@
102
103 @NGR_R_ARGS@
104 @NGR_R_BAD@
105 @NGR_R_COPY@
106 @NGR_R_COPY_ARGS@
107 @NGR_R_CONST@
108 @NGR_R_END_RESULT@
109 @NGR_R_END_RETURN@
110 @NGR_R_END_ARGS@
111 @NGR_R_OK@
112 @NGR_R_RETURN@
113 @NGR_R_SET_CONST@
114 @NGR_R_SET_RESULT@
115 @NGR_R_SET_RETURN@
116 @NGR_R_SET_ARGS@
117 @NGR_R_PRIVATE@
118
119 #if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS)
120 #define NGR_R_SET_ARGS NGR_R_END_ARGS
121 #endif
122
123 @PROTO_R_ARGS@
124 @PROTO_R_BAD@
125 @PROTO_R_COPY@
126 @PROTO_R_COPY_ARGS@
127 @PROTO_R_END_RESULT@
128 @PROTO_R_END_RETURN@
129 @PROTO_R_ENT_ARGS@
130 @PROTO_R_ENT_UNUSED@
131 @PROTO_R_OK@
132 @PROTO_R_SETANSWER@
133 @PROTO_R_RETURN@
134 @PROTO_R_SET_RESULT@
135 @PROTO_R_SET_RETURN@
136 @PROTOENT_DATA@
137
138 @PASS_R_ARGS@
139 @PASS_R_BAD@
140 @PASS_R_COPY@
141 @PASS_R_COPY_ARGS@
142 @PASS_R_END_RESULT@
143 @PASS_R_END_RETURN@
144 @PASS_R_ENT_ARGS@
145 @PASS_R_OK@
146 @PASS_R_RETURN@
147 @PASS_R_SET_RESULT@
148 @PASS_R_SET_RETURN@
149
150 @SERV_R_ARGS@
151 @SERV_R_BAD@
152 @SERV_R_COPY@
153 @SERV_R_COPY_ARGS@
154 @SERV_R_END_RESULT@
155 @SERV_R_END_RETURN@
156 @SERV_R_ENT_ARGS@
157 @SERV_R_ENT_UNUSED@
158 @SERV_R_OK@
159 @SERV_R_SETANSWER@
160 @SERV_R_RETURN@
161 @SERV_R_SET_RESULT@
162 @SERV_R_SET_RETURN@
163 @SERVENT_DATA@
164
165
166 #define DE_CONST(konst, var) \
167         do { \
168                 union { const void *k; void *v; } _u; \
169                 _u.k = konst; \
170                 var = _u.v; \
171         } while (0)
172
173 #define UNUSED(x) (x) = (x)
174
175 @SOLARIS_BITTYPES@
176 @ISC_SOCKLEN_T@
177
178 #ifdef __GNUC__
179 #define ISC_FORMAT_PRINTF(fmt, args) \
180         __attribute__((__format__(__printf__, fmt, args)))
181 #else
182 #define ISC_FORMAT_PRINTF(fmt, args)
183 #endif
184
185 /* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
186 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
187 #include <sys/byteorder.h>
188 #endif
189
190 #endif
191
192 /*! \file */