blob: fce7445189d58d33793152eb63cd3d4ab0161001 (
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
|
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SUNW_PORT_AFTER_H
#define _SUNW_PORT_AFTER_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* rename setnetgrent and endnetgrent which were formerly in a separate irs
* shared library. These functions should come from libc.so
*/
#define setnetgrent res_setnetgrent
#ifdef SETNETGRENT_ARGS
void setnetgrent(SETNETGRENT_ARGS);
#else
void setnetgrent(const char *netgroup);
#endif
#define endnetgrent res_endnetgrent
void endnetgrent(void);
/*
* include ports for the public header files. ISC's versions are quite different
* from those currently in OpenSolaris.
*/
#ifdef _RESOLV_H_
#include <port_resolv.h>
#endif /* _RESOLV_H_ */
#ifdef _NETDB_H
#include <port_netdb.h>
#endif /* _NETDB_H */
#ifdef _ARPA_INET_H
#include <arpa/port_inet.h>
#endif /* _ARPA_INET_H */
#ifdef _ARPA_NAMESER_H
#include <arpa/port_nameser.h>
#endif /* _ARPA_NAMESER_H */
#ifdef _ARPA_NAMESER_COMPAT_H
/* no changes */
#endif /* _ARPA_NAMESER_COMPAT_H */
/* version-specific defines */
#include <os_version.h>
/*
* Prior to 2.6, Solaris needs a prototype for gethostname().
*/
#if (OS_MAJOR == 5 && OS_MINOR < 6)
extern int gethostname(char *, size_t);
#endif
/*
* gethostid() was not available until 2.5
* setsockopt(SO_REUSEADDR) fails on unix domain sockets before 2.5
* use ioctl(FIONBIO) rather than fcntl() calls to set/clear non-blocking i/o.
*/
#if (OS_MAJOR == 5 && OS_MINOR < 5)
#define GET_HOST_ID_MISSING
#define NO_UNIX_REUSEADDR
#define USE_FIONBIO_IOCTL
#endif
#if (OS_MAJOR == 5 && OS_MINOR < 11)
#define NEED_STRSEP
extern char *strsep(char **, const char *);
#endif
/*
* Solaris 2.5 and later have getrlimit(), setrlimit() and getrusage().
*/
#if (OS_MAJOR > 5 || (OS_MAJOR == 5 && OS_MINOR >= 5))
#include <sys/resource.h>
#define HAVE_GETRUSAGE
#define RLIMIT_TYPE rlim_t
#define RLIMIT_FILE_INFINITY
#endif
/* the default syslog facility of named/lwresd. */
#ifndef ISC_FACILITY
#define ISC_FACILITY LOG_DAEMON
#endif
/*
* Solaris 8 has if_nametoindex().
*/
#if (OS_MAJOR > 5 || (OS_MAJOR == 5 && OS_MINOR >= 8))
#define USE_IFNAMELINKID
#endif
#undef ALIGN
#if (OS_MAJOR == 5 && OS_MINOR > 8)
#define ALIGN(x) (((uintptr_t)(x) + (sizeof (char *) - 1UL)) & \
~(sizeof (char *) - 1UL))
#else
#define ALIGN(x) (((unsigned long)(x) + (sizeof (char *) - 1UL)) & \
~(sizeof (char *) - 1UL))
#endif
#if (OS_MAJOR == 5 && OS_MINOR < 5)
#ifndef USE_FIONBIO_IOCTL
#define USE_FIONBIO_IOCTL 1
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif /* _SUNW_PORT_AFTER_H */
|