summaryrefslogtreecommitdiffstats
path: root/lib/bind/bind/port_before.h
blob: 37dfac7b13e89318859ed28c97ff2d3c09ca8db3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
/* $FreeBSD$ */

#ifndef port_before_h
#define port_before_h
#include <config.h>

#ifdef NEED_SUN4PROTOS
#define _PARAMS(x) x
#endif

struct group;           /* silence warning */
struct passwd;          /* silence warning */
struct timeval;         /* silence warning */
struct timezone;        /* silence warning */

#ifdef HAVE_SYS_TIMERS_H
#include <sys/timers.h>
#endif
#include <limits.h>

#ifdef ISC_PLATFORM_NEEDTIMESPEC
#include <time.h>		/* For time_t */
struct timespec {
        time_t  tv_sec;         /* seconds */
        long    tv_nsec;        /* nanoseconds */
};
#endif
#ifndef HAVE_MEMMOVE
#define memmove(a,b,c) bcopy(b,a,c)
#endif

#undef WANT_IRS_GR
#undef WANT_IRS_NIS
#undef WANT_IRS_PW

#undef BSD_COMP
#undef HAVE_POLL
#undef HAVE_MD5
#undef SOLARIS2

#define DO_PTHREADS 1
#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
#define GETNETBYADDR_ADDR_T unsigned long int
#define SETPWENT_VOID 1
#undef SETGRENT_VOID

#define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop
#define NET_R_BAD ERANGE
#define NET_R_COPY buf, buflen
#define NET_R_COPY_ARGS char *buf, size_t buflen
#define NET_R_END_RESULT(x) /*empty*/
#define NET_R_END_RETURN void
#undef NET_R_ENT_ARGS /*empty*/
#define NET_R_OK 0
#define NET_R_RETURN int
#undef NET_R_SET_RESULT /*empty*/
#define NET_R_SETANSWER 1
#define NET_R_SET_RETURN void
#undef NETENT_DATA


#define GROUP_R_SET_RETURN void
#undef GROUP_R_SET_RESULT /*empty*/
#define GROUP_R_END_RETURN void
#define GROUP_R_END_RESULT(x) /*empty*/

#define GROUP_R_ENT_ARGS void



#define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop
#define HOST_R_BAD ERANGE
#define HOST_R_COPY buf, buflen
#define HOST_R_COPY_ARGS char *buf, int buflen
#define HOST_R_END_RESULT(x) /*empty*/
#define HOST_R_END_RETURN void
#undef HOST_R_ENT_ARGS /*empty*/
#define HOST_R_ERRNO *h_errnop = h_errno
#define HOST_R_OK 0
#define HOST_R_RETURN int
#define HOST_R_SETANSWER 1
#undef HOST_R_SET_RESULT
#define HOST_R_SET_RETURN void
#undef HOSTENT_DATA

#define NGR_R_ARGS char *buf, int buflen
#define NGR_R_BAD (0)
#define NGR_R_COPY buf, buflen
#define NGR_R_COPY_ARGS NGR_R_ARGS
#define NGR_R_CONST
#define NGR_R_END_RESULT(x)  /*empty*/
#define NGR_R_END_RETURN void
#undef NGR_R_END_ARGS /*empty*/
#define NGR_R_OK 1
#define NGR_R_RETURN int
#define NGR_R_SET_CONST const
#undef NGR_R_SET_RESULT /*empty*/
#define NGR_R_SET_RETURN void
#undef NGR_R_SET_ARGS


#if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS)
#define NGR_R_SET_ARGS NGR_R_END_ARGS
#endif

#define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp
#define PROTO_R_BAD ERANGE
#define PROTO_R_COPY buf, buflen
#define PROTO_R_COPY_ARGS char *buf, size_t buflen
#define PROTO_R_END_RESULT(x) /*empty*/
#define PROTO_R_END_RETURN void
#undef PROTO_R_ENT_ARGS /*empty*/
#undef PROTO_R_ENT_UNUSED
#define PROTO_R_OK 0
#define PROTO_R_SETANSWER 1
#define PROTO_R_RETURN int
#undef PROTO_R_SET_RESULT
#define PROTO_R_SET_RETURN void
#undef PROTOENT_DATA





#define PASS_R_END_RESULT(x) /*empty*/
#define PASS_R_END_RETURN void
#undef PASS_R_ENT_ARGS


#undef PASS_R_SET_RESULT /*empty*/
#define PASS_R_SET_RETURN void

#define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp
#define SERV_R_BAD ERANGE
#define SERV_R_COPY buf, buflen
#define SERV_R_COPY_ARGS char *buf, size_t buflen
#define SERV_R_END_RESULT(x) /*empty*/
#define SERV_R_END_RETURN void 
#undef SERV_R_ENT_ARGS /*empty*/
#undef SERV_R_ENT_UNUSED /*empty*/
#define SERV_R_OK (0)
#define SERV_R_SETANSWER 1
#define SERV_R_RETURN int
#undef SERV_R_SET_RESULT
#define SERV_R_SET_RETURN void



#define DE_CONST(konst, var) \
        do { \
                union { const void *k; void *v; } _u; \
                _u.k = konst; \
                var = _u.v; \
        } while (0)

#define UNUSED(x) (x) = (x)

#undef NEED_SOLARIS_BITTYPES
#define ISC_SOCKLEN_T socklen_t

#ifdef __GNUC__
#define ISC_FORMAT_PRINTF(fmt, args) \
	__attribute__((__format__(__printf__, fmt, args)))
#else
#define ISC_FORMAT_PRINTF(fmt, args)
#endif

/* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
#include <sys/byteorder.h>
#endif

#endif

/*! \file */
OpenPOWER on IntegriCloud