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