2N/A/*
2N/A * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
2N/A */
2N/A
2N/A/*
2N/A * Copyright (C) 2005-2008 Internet Systems Consortium, Inc. ("ISC")
2N/A * Copyright (C) 2001 Internet Software Consortium.
2N/A *
2N/A * Permission to use, copy, modify, and/or distribute this software for any
2N/A * purpose with or without fee is hereby granted, provided that the above
2N/A * copyright notice and this permission notice appear in all copies.
2N/A *
2N/A * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
2N/A * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
2N/A * AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
2N/A * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
2N/A * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
2N/A * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
2N/A * PERFORMANCE OF THIS SOFTWARE.
2N/A */
2N/A
2N/A/* $Id: port_before.h.in,v 1.31 2008/02/28 05:36:10 marka Exp $ */
2N/A
2N/A#ifndef port_before_h
2N/A#define port_before_h
2N/A/* Solaris-specific changes */
2N/A#include "sunw_port_before.h"
2N/A#include <config.h>
2N/A
2N/A#ifdef NEED_SUN4PROTOS
2N/A#define _PARAMS(x) x
2N/A#endif
2N/A
2N/Astruct group; /* silence warning */
2N/Astruct passwd; /* silence warning */
2N/Astruct timeval; /* silence warning */
2N/Astruct timezone; /* silence warning */
2N/A
2N/A#ifdef HAVE_SYS_TIMERS_H
2N/A#include <sys/timers.h>
2N/A#endif
2N/A#include <limits.h>
2N/A
2N/A#ifdef ISC_PLATFORM_NEEDTIMESPEC
2N/A#include <time.h> /* For time_t */
2N/Astruct timespec {
2N/A time_t tv_sec; /* seconds */
2N/A long tv_nsec; /* nanoseconds */
2N/A};
2N/A#endif
2N/A#ifndef HAVE_MEMMOVE
2N/A#define memmove(a,b,c) bcopy(b,a,c)
2N/A#endif
2N/A
2N/A#undef WANT_IRS_GR
2N/A#undef WANT_IRS_NIS
2N/A#undef WANT_IRS_PW
2N/A
2N/A#define BSD_COMP 1
2N/A#define USE_POLL 1
2N/A#define HAVE_MD5 1
2N/A#define SOLARIS2 1
2N/A
2N/A/* DO_PTHREADS is conditionally defined in sunw_port_before.h
2N/A * #define DO_PTHREADS 1 */
2N/A#define GETGROUPLIST_ARGS const char *name, gid_t basegid, gid_t *groups, int *ngroups
2N/A#define GETNETBYADDR_ADDR_T long
2N/A#define SETPWENT_VOID 1
2N/A#define SETGRENT_VOID 1
2N/A
2N/A#define NET_R_ARGS char *buf, int buflen
2N/A#define NET_R_BAD NULL
2N/A#define NET_R_COPY buf, buflen
2N/A#define NET_R_COPY_ARGS NET_R_ARGS
2N/A#define NET_R_END_RESULT(x) /*empty*/
2N/A#define NET_R_END_RETURN void
2N/A#undef NET_R_ENT_ARGS /*empty*/
2N/A#define NET_R_OK nptr
2N/A#define NET_R_RETURN struct netent *
2N/A#undef NET_R_SET_RESULT /*empty*/
2N/A#undef NET_R_SETANSWER
2N/A#define NET_R_SET_RETURN void
2N/A#undef NETENT_DATA
2N/A
2N/A#define GROUP_R_RETURN struct group *
2N/A#define GROUP_R_SET_RETURN void
2N/A#undef GROUP_R_SET_RESULT /*empty*/
2N/A#define GROUP_R_END_RETURN void
2N/A#define GROUP_R_END_RESULT(x) /*empty*/
2N/A#define GROUP_R_ARGS char *buf, int buflen
2N/A#define GROUP_R_ENT_ARGS void
2N/A#define GROUP_R_OK gptr
2N/A#define GROUP_R_BAD NULL
2N/A
2N/A#define HOST_R_ARGS char *buf, int buflen, int *h_errnop
2N/A#define HOST_R_BAD NULL
2N/A#define HOST_R_COPY buf, buflen
2N/A#define HOST_R_COPY_ARGS char *buf, int buflen
2N/A#define HOST_R_END_RESULT(x) /*empty*/
2N/A#define HOST_R_END_RETURN void
2N/A#undef HOST_R_ENT_ARGS /*empty*/
2N/A#define HOST_R_ERRNO *h_errnop = h_errno
2N/A#define HOST_R_OK hptr
2N/A#define HOST_R_RETURN struct hostent *
2N/A#undef HOST_R_SETANSWER
2N/A#undef HOST_R_SET_RESULT
2N/A#define HOST_R_SET_RETURN void
2N/A#undef HOSTENT_DATA
2N/A
2N/A#define NGR_R_ARGS char *buf, int buflen
2N/A#define NGR_R_BAD (0)
2N/A#define NGR_R_COPY buf, buflen
2N/A#define NGR_R_COPY_ARGS NGR_R_ARGS
2N/A#define NGR_R_CONST
2N/A#define NGR_R_END_RESULT(x) /*empty*/
2N/A#define NGR_R_END_RETURN void
2N/A#undef NGR_R_END_ARGS /*empty*/
2N/A#define NGR_R_OK 1
2N/A#define NGR_R_RETURN int
2N/A#define NGR_R_SET_CONST const
2N/A#undef NGR_R_SET_RESULT /*empty*/
2N/A#define NGR_R_SET_RETURN void
2N/A#undef NGR_R_SET_ARGS
2N/A
2N/A
2N/A#if !defined(NGR_R_SET_ARGS) && defined(NGR_R_END_ARGS)
2N/A#define NGR_R_SET_ARGS NGR_R_END_ARGS
2N/A#endif
2N/A
2N/A#define PROTO_R_ARGS char *buf, int buflen
2N/A#define PROTO_R_BAD NULL
2N/A#define PROTO_R_COPY buf, buflen
2N/A#define PROTO_R_COPY_ARGS PROTO_R_ARGS
2N/A#define PROTO_R_END_RESULT(x) /*empty*/
2N/A#define PROTO_R_END_RETURN void
2N/A#undef PROTO_R_ENT_ARGS /*empty*/
2N/A#undef PROTO_R_ENT_UNUSED
2N/A#define PROTO_R_OK pptr
2N/A#undef PROTO_R_SETANSWER
2N/A#define PROTO_R_RETURN struct protoent *
2N/A#undef PROTO_R_SET_RESULT
2N/A#define PROTO_R_SET_RETURN void
2N/A#undef PROTOENT_DATA
2N/A
2N/A#define PASS_R_ARGS char *buf, int buflen
2N/A#define PASS_R_BAD NULL
2N/A#define PASS_R_COPY buf, buflen
2N/A#define PASS_R_COPY_ARGS PASS_R_ARGS
2N/A#define PASS_R_END_RESULT(x) /*empty*/
2N/A#define PASS_R_END_RETURN void
2N/A#undef PASS_R_ENT_ARGS
2N/A#define PASS_R_OK pwptr
2N/A#define PASS_R_RETURN struct passwd *
2N/A#undef PASS_R_SET_RESULT /*empty*/
2N/A#define PASS_R_SET_RETURN void
2N/A
2N/A#define SERV_R_ARGS char *buf, int buflen
2N/A#define SERV_R_BAD NULL
2N/A#define SERV_R_COPY buf, buflen
2N/A#define SERV_R_COPY_ARGS SERV_R_ARGS
2N/A#define SERV_R_END_RESULT(x) /*empty*/
2N/A#define SERV_R_END_RETURN void
2N/A#undef SERV_R_ENT_ARGS /*empty*/
2N/A#undef SERV_R_ENT_UNUSED /*empty*/
2N/A#define SERV_R_OK sptr
2N/A#undef SERV_R_SETANSWER
2N/A#define SERV_R_RETURN struct servent *
2N/A#undef SERV_R_SET_RESULT
2N/A#define SERV_R_SET_RETURN void
2N/A
2N/A
2N/A
2N/A#define DE_CONST(konst, var) \
2N/A do { \
2N/A union { const void *k; void *v; } _u; \
2N/A _u.k = konst; \
2N/A var = _u.v; \
2N/A } while (0)
2N/A
2N/A#define UNUSED(x) (x) = (x)
2N/A
2N/A#undef NEED_SOLARIS_BITTYPES
2N/A#define ISC_SOCKLEN_T socklen_t
2N/A
2N/A#ifdef __GNUC__
2N/A#define ISC_FORMAT_PRINTF(fmt, args) \
2N/A __attribute__((__format__(__printf__, fmt, args)))
2N/A#else
2N/A#define ISC_FORMAT_PRINTF(fmt, args)
2N/A#endif
2N/A
2N/A/* Pull in host order macros when _XOPEN_SOURCE_EXTENDED is defined. */
2N/A#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED)
2N/A#include <sys/byteorder.h>
2N/A#endif
2N/A
2N/A#endif
2N/A
2N/A/*! \file */