]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - 6/lib/bind/bind/port_before.h
Clone Kip's Xen on stable/6 tree so that I can work on improving FreeBSD/amd64
[FreeBSD/FreeBSD.git] / 6 / lib / bind / bind / port_before.h
1 /* $FreeBSD$ */
2
3 #ifndef port_before_h
4 #define port_before_h
5 #include <config.h>
6
7 struct group;           /* silence warning */
8 struct passwd;          /* silence warning */
9 struct timeval;         /* silence warning */
10 struct timezone;        /* silence warning */
11
12 #ifdef HAVE_SYS_TIMERS_H
13 #include <sys/timers.h>
14 #endif
15 #include <limits.h>
16
17 #ifdef ISC_PLATFORM_NEEDTIMESPEC
18 #include <time.h>               /* For time_t */
19 struct timespec {
20         time_t  tv_sec;         /* seconds */
21         long    tv_nsec;        /* nanoseconds */
22 };
23 #endif
24 #ifndef HAVE_MEMMOVE
25 #define memmove(a,b,c) bcopy(b,a,c)
26 #endif
27
28 #undef WANT_IRS_GR
29 #undef WANT_IRS_NIS
30 #undef WANT_IRS_PW
31
32 #undef BSD_COMP
33 #undef HAVE_POLL
34 #undef HAVE_MD5
35 #undef SOLARIS2
36
37 #undef DO_PTHREADS
38 #define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
39 #define GETNETBYADDR_ADDR_T unsigned long int
40 #define SETPWENT_VOID 1
41 #undef SETGRENT_VOID
42
43 #define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop
44 #define NET_R_BAD ERANGE
45 #define NET_R_COPY buf, buflen
46 #define NET_R_COPY_ARGS char *buf, size_t buflen
47 #define NET_R_END_RESULT(x) /*empty*/
48 #define NET_R_END_RETURN void
49 #undef NET_R_ENT_ARGS /*empty*/
50 #define NET_R_OK 0
51 #define NET_R_RETURN int
52 #undef NET_R_SET_RESULT /*empty*/
53 #define NET_R_SETANSWER 1
54 #define NET_R_SET_RETURN void
55 #undef NETENT_DATA
56
57
58 #define GROUP_R_SET_RETURN void
59 #undef GROUP_R_SET_RESULT /*empty*/
60 #define GROUP_R_END_RETURN void
61 #define GROUP_R_END_RESULT(x) /*empty*/
62
63 #define GROUP_R_ENT_ARGS void
64
65
66
67 #define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop
68 #define HOST_R_BAD ERANGE
69 #define HOST_R_COPY buf, buflen
70 #define HOST_R_COPY_ARGS char *buf, int buflen
71 #define HOST_R_END_RESULT(x) /*empty*/
72 #define HOST_R_END_RETURN void
73 #undef HOST_R_ENT_ARGS /*empty*/
74 #define HOST_R_ERRNO *h_errnop = h_errno
75 #define HOST_R_OK 0
76 #define HOST_R_RETURN int
77 #define HOST_R_SETANSWER 1
78 #undef HOST_R_SET_RESULT
79 #define HOST_R_SET_RETURN void
80 #undef HOSTENT_DATA
81
82 #define NGR_R_ARGS char *buf, int buflen
83 #define NGR_R_BAD (0)
84 #define NGR_R_COPY buf, buflen
85 #define NGR_R_COPY_ARGS NGR_R_ARGS
86 #define NGR_R_END_RESULT(x)  /*empty*/
87 #define NGR_R_END_RETURN void
88 #undef NGR_R_ENT_ARGS /*empty*/
89 #define NGR_R_OK 1
90 #define NGR_R_RETURN int
91 #undef NGR_R_SET_RESULT /*empty*/
92 #define NGR_R_SET_RETURN void
93
94
95 #define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp
96 #define PROTO_R_BAD ERANGE
97 #define PROTO_R_COPY buf, buflen
98 #define PROTO_R_COPY_ARGS char *buf, size_t buflen
99 #define PROTO_R_END_RESULT(x) /*empty*/
100 #define PROTO_R_END_RETURN void
101 #undef PROTO_R_ENT_ARGS /*empty*/
102 #undef PROTO_R_ENT_UNUSED
103 #define PROTO_R_OK 0
104 #define PROTO_R_SETANSWER 1
105 #define PROTO_R_RETURN int
106 #undef PROTO_R_SET_RESULT
107 #define PROTO_R_SET_RETURN void
108 #undef PROTOENT_DATA
109
110
111
112
113
114 #define PASS_R_END_RESULT(x) /*empty*/
115 #define PASS_R_END_RETURN void
116 #undef PASS_R_ENT_ARGS
117
118
119 #undef PASS_R_SET_RESULT /*empty*/
120 #define PASS_R_SET_RETURN void
121
122 #define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp
123 #define SERV_R_BAD ERANGE
124 #define SERV_R_COPY buf, buflen
125 #define SERV_R_COPY_ARGS char *buf, size_t buflen
126 #define SERV_R_END_RESULT(x) /*empty*/
127 #define SERV_R_END_RETURN void 
128 #undef SERV_R_ENT_ARGS /*empty*/
129 #undef SERV_R_ENT_UNUSED /*empty*/
130 #define SERV_R_OK (0)
131 #define SERV_R_SETANSWER 1
132 #define SERV_R_RETURN int
133 #undef SERV_R_SET_RESULT
134 #define SERV_R_SET_RETURN void
135
136
137
138 #define DE_CONST(konst, var) \
139         do { \
140                 union { const void *k; void *v; } _u; \
141                 _u.k = konst; \
142                 var = _u.v; \
143         } while (0)
144
145 #define UNUSED(x) (x) = (x)
146
147 #undef NEED_SOLARIS_BITTYPES
148 #define ISC_SOCKLEN_T socklen_t
149
150 #ifdef __GNUC__
151 #define ISC_FORMAT_PRINTF(fmt, args) \
152         __attribute__((__format__(__printf__, fmt, args)))
153 #else
154 #define ISC_FORMAT_PRINTF(fmt, args)
155 #endif
156
157 /* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
158 #if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
159 #include <sys/byteorder.h>
160 #endif
161
162 #endif