2 * Copyright (C) 2005-2008 Internet Systems Consortium, Inc. ("ISC")
3 * Copyright (C) 2001 Internet Software Consortium.
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.
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.
18 /* $Id: port_before.h.in,v 1.27.128.3 2008/02/28 05:46:12 marka Exp $ */
24 #ifdef NEED_SUN4PROTOS
28 struct group
; /* silence warning */
29 struct passwd
; /* silence warning */
30 struct timeval
; /* silence warning */
31 struct timezone
; /* silence warning */
33 #ifdef HAVE_SYS_TIMERS_H
34 #include <sys/timers.h>
38 #ifdef ISC_PLATFORM_NEEDTIMESPEC
39 #include <time.h> /* For time_t */
41 time_t tv_sec
; /* seconds */
42 long tv_nsec
; /* nanoseconds */
46 /*#define memmove(a,b,c) bcopy(b,a,c)*/
59 #define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
60 #define GETNETBYADDR_ADDR_T unsigned long int
61 #define SETPWENT_VOID 1
62 #define SETGRENT_VOID 1
64 #define NET_R_ARGS char *buf, size_t buflen, struct netent **answerp, int *h_errnop
65 #define NET_R_BAD ERANGE
66 #define NET_R_COPY buf, buflen
67 #define NET_R_COPY_ARGS char *buf, size_t buflen
68 #define NET_R_END_RESULT(x) /*empty*/
69 #define NET_R_END_RETURN void
70 #undef NET_R_ENT_ARGS /*empty*/
72 #define NET_R_RETURN int
73 #undef NET_R_SET_RESULT /*empty*/
74 #define NET_R_SETANSWER 1
75 #define NET_R_SET_RETURN void
79 #define GROUP_R_SET_RETURN void
80 #undef GROUP_R_SET_RESULT /*empty*/
81 #define GROUP_R_END_RETURN void
82 #define GROUP_R_END_RESULT(x) /*empty*/
84 #define GROUP_R_ENT_ARGS void
88 #define HOST_R_ARGS char *buf, size_t buflen, struct hostent **answerp, int *h_errnop
89 #define HOST_R_BAD ERANGE
90 #define HOST_R_COPY buf, buflen
91 #define HOST_R_COPY_ARGS char *buf, int buflen
92 #define HOST_R_END_RESULT(x) /*empty*/
93 #define HOST_R_END_RETURN void
94 #undef HOST_R_ENT_ARGS /*empty*/
95 #define HOST_R_ERRNO *h_errnop = h_errno
97 #define HOST_R_RETURN int
98 #define HOST_R_SETANSWER 1
99 #undef HOST_R_SET_RESULT
100 #define HOST_R_SET_RETURN void
103 #define NGR_R_ARGS char *buf, int buflen
104 #define NGR_R_BAD (0)
105 #define NGR_R_COPY buf, buflen
106 #define NGR_R_COPY_ARGS NGR_R_ARGS
108 #define NGR_R_END_RESULT(x) /*empty*/
109 #define NGR_R_END_RETURN void
110 #undef NGR_R_END_ARGS /*empty*/
112 #define NGR_R_RETURN int
113 #define NGR_R_SET_CONST const
114 #undef NGR_R_SET_RESULT /*empty*/
115 #define NGR_R_SET_RETURN void
116 #undef NGR_R_SET_ARGS
119 #if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS)
120 #define NGR_R_SET_ARGS NGR_R_END_ARGS
123 #define PROTO_R_ARGS char *buf, size_t buflen, struct protoent **answerp
124 #define PROTO_R_BAD ERANGE
125 #define PROTO_R_COPY buf, buflen
126 #define PROTO_R_COPY_ARGS char *buf, size_t buflen
127 #define PROTO_R_END_RESULT(x) /*empty*/
128 #define PROTO_R_END_RETURN void
129 #undef PROTO_R_ENT_ARGS /*empty*/
130 #undef PROTO_R_ENT_UNUSED
132 #define PROTO_R_SETANSWER 1
133 #define PROTO_R_RETURN int
134 #undef PROTO_R_SET_RESULT
135 #define PROTO_R_SET_RETURN void
142 #define PASS_R_END_RESULT(x) /*empty*/
143 #define PASS_R_END_RETURN void
144 #undef PASS_R_ENT_ARGS
147 #undef PASS_R_SET_RESULT /*empty*/
148 #define PASS_R_SET_RETURN void
150 #define SERV_R_ARGS char *buf, size_t buflen, struct servent **answerp
151 #define SERV_R_BAD ERANGE
152 #define SERV_R_COPY buf, buflen
153 #define SERV_R_COPY_ARGS char *buf, size_t buflen
154 #define SERV_R_END_RESULT(x) /*empty*/
155 #define SERV_R_END_RETURN void
156 #undef SERV_R_ENT_ARGS /*empty*/
157 #undef SERV_R_ENT_UNUSED /*empty*/
158 #define SERV_R_OK (0)
159 #define SERV_R_SETANSWER 1
160 #define SERV_R_RETURN int
161 #undef SERV_R_SET_RESULT
162 #define SERV_R_SET_RETURN void
166 #define DE_CONST(konst, var) \
168 union { const void *k; void *v; } _u; \
173 #define UNUSED(x) (x) = (x)
175 #undef NEED_SOLARIS_BITTYPES
176 #define ISC_SOCKLEN_T socklen_t
179 #define ISC_FORMAT_PRINTF(fmt, args) \
180 __attribute__((__format__(__printf__, fmt, args)))
182 #define ISC_FORMAT_PRINTF(fmt, args)
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>