xref: /onnv-gate/usr/src/lib/libresolv2/include/sunw_port_after.h (revision 11038:74b12212b8a2)
1*11038SRao.Shoaib@Sun.COM /*
2*11038SRao.Shoaib@Sun.COM  * Copyright 2009 Sun Microsystems, Inc.  All rights reserved.
3*11038SRao.Shoaib@Sun.COM  * Use is subject to license terms.
4*11038SRao.Shoaib@Sun.COM  */
5*11038SRao.Shoaib@Sun.COM 
6*11038SRao.Shoaib@Sun.COM #ifndef	_SUNW_PORT_AFTER_H
7*11038SRao.Shoaib@Sun.COM #define	_SUNW_PORT_AFTER_H
8*11038SRao.Shoaib@Sun.COM 
9*11038SRao.Shoaib@Sun.COM #ifdef	__cplusplus
10*11038SRao.Shoaib@Sun.COM extern "C" {
11*11038SRao.Shoaib@Sun.COM #endif
12*11038SRao.Shoaib@Sun.COM 
13*11038SRao.Shoaib@Sun.COM /*
14*11038SRao.Shoaib@Sun.COM  * rename setnetgrent and endnetgrent which were formerly in a separate irs
15*11038SRao.Shoaib@Sun.COM  * shared library.  These functions should come from libc.so
16*11038SRao.Shoaib@Sun.COM  */
17*11038SRao.Shoaib@Sun.COM #define	setnetgrent res_setnetgrent
18*11038SRao.Shoaib@Sun.COM #ifdef SETNETGRENT_ARGS
19*11038SRao.Shoaib@Sun.COM void setnetgrent(SETNETGRENT_ARGS);
20*11038SRao.Shoaib@Sun.COM #else
21*11038SRao.Shoaib@Sun.COM void setnetgrent(const char *netgroup);
22*11038SRao.Shoaib@Sun.COM #endif
23*11038SRao.Shoaib@Sun.COM 
24*11038SRao.Shoaib@Sun.COM #define	endnetgrent res_endnetgrent
25*11038SRao.Shoaib@Sun.COM void endnetgrent(void);
26*11038SRao.Shoaib@Sun.COM 
27*11038SRao.Shoaib@Sun.COM 
28*11038SRao.Shoaib@Sun.COM /*
29*11038SRao.Shoaib@Sun.COM  * include ports for the public header files. ISC's versions are quite different
30*11038SRao.Shoaib@Sun.COM  * from those currently in OpenSolaris.
31*11038SRao.Shoaib@Sun.COM  */
32*11038SRao.Shoaib@Sun.COM 
33*11038SRao.Shoaib@Sun.COM #ifdef _RESOLV_H_
34*11038SRao.Shoaib@Sun.COM #include <port_resolv.h>
35*11038SRao.Shoaib@Sun.COM #endif /* _RESOLV_H_ */
36*11038SRao.Shoaib@Sun.COM 
37*11038SRao.Shoaib@Sun.COM #ifdef _NETDB_H
38*11038SRao.Shoaib@Sun.COM #include <port_netdb.h>
39*11038SRao.Shoaib@Sun.COM #endif /* _NETDB_H */
40*11038SRao.Shoaib@Sun.COM 
41*11038SRao.Shoaib@Sun.COM #ifdef _ARPA_INET_H
42*11038SRao.Shoaib@Sun.COM #include <arpa/port_inet.h>
43*11038SRao.Shoaib@Sun.COM #endif /* _ARPA_INET_H */
44*11038SRao.Shoaib@Sun.COM 
45*11038SRao.Shoaib@Sun.COM #ifdef _ARPA_NAMESER_H
46*11038SRao.Shoaib@Sun.COM #include <arpa/port_nameser.h>
47*11038SRao.Shoaib@Sun.COM #endif /* _ARPA_NAMESER_H */
48*11038SRao.Shoaib@Sun.COM 
49*11038SRao.Shoaib@Sun.COM 
50*11038SRao.Shoaib@Sun.COM #ifdef _ARPA_NAMESER_COMPAT_H
51*11038SRao.Shoaib@Sun.COM /* no changes */
52*11038SRao.Shoaib@Sun.COM #endif /* _ARPA_NAMESER_COMPAT_H */
53*11038SRao.Shoaib@Sun.COM 
54*11038SRao.Shoaib@Sun.COM /* version-specific defines */
55*11038SRao.Shoaib@Sun.COM #include <os_version.h>
56*11038SRao.Shoaib@Sun.COM 
57*11038SRao.Shoaib@Sun.COM /*
58*11038SRao.Shoaib@Sun.COM  * Prior to 2.6, Solaris needs a prototype for gethostname().
59*11038SRao.Shoaib@Sun.COM  */
60*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR == 5 && OS_MINOR < 6)
61*11038SRao.Shoaib@Sun.COM extern int gethostname(char *, size_t);
62*11038SRao.Shoaib@Sun.COM #endif
63*11038SRao.Shoaib@Sun.COM /*
64*11038SRao.Shoaib@Sun.COM  * gethostid() was not available until 2.5
65*11038SRao.Shoaib@Sun.COM  * setsockopt(SO_REUSEADDR) fails on unix domain sockets before 2.5
66*11038SRao.Shoaib@Sun.COM  * use ioctl(FIONBIO) rather than fcntl() calls to set/clear non-blocking i/o.
67*11038SRao.Shoaib@Sun.COM  */
68*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR == 5 && OS_MINOR < 5)
69*11038SRao.Shoaib@Sun.COM #define	GET_HOST_ID_MISSING
70*11038SRao.Shoaib@Sun.COM #define	NO_UNIX_REUSEADDR
71*11038SRao.Shoaib@Sun.COM #define	USE_FIONBIO_IOCTL
72*11038SRao.Shoaib@Sun.COM #endif
73*11038SRao.Shoaib@Sun.COM 
74*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR == 5 && OS_MINOR < 11)
75*11038SRao.Shoaib@Sun.COM #define	NEED_STRSEP
76*11038SRao.Shoaib@Sun.COM extern char *strsep(char **, const char *);
77*11038SRao.Shoaib@Sun.COM #endif
78*11038SRao.Shoaib@Sun.COM 
79*11038SRao.Shoaib@Sun.COM 
80*11038SRao.Shoaib@Sun.COM /*
81*11038SRao.Shoaib@Sun.COM  * Solaris 2.5 and later have getrlimit(), setrlimit() and getrusage().
82*11038SRao.Shoaib@Sun.COM  */
83*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR > 5 || (OS_MAJOR == 5 && OS_MINOR >= 5))
84*11038SRao.Shoaib@Sun.COM #include <sys/resource.h>
85*11038SRao.Shoaib@Sun.COM #define	HAVE_GETRUSAGE
86*11038SRao.Shoaib@Sun.COM #define	RLIMIT_TYPE rlim_t
87*11038SRao.Shoaib@Sun.COM #define	RLIMIT_FILE_INFINITY
88*11038SRao.Shoaib@Sun.COM #endif
89*11038SRao.Shoaib@Sun.COM 
90*11038SRao.Shoaib@Sun.COM /* the default syslog facility of named/lwresd. */
91*11038SRao.Shoaib@Sun.COM #ifndef ISC_FACILITY
92*11038SRao.Shoaib@Sun.COM #define	ISC_FACILITY LOG_DAEMON
93*11038SRao.Shoaib@Sun.COM #endif
94*11038SRao.Shoaib@Sun.COM 
95*11038SRao.Shoaib@Sun.COM 
96*11038SRao.Shoaib@Sun.COM /*
97*11038SRao.Shoaib@Sun.COM  * Solaris 8 has if_nametoindex().
98*11038SRao.Shoaib@Sun.COM  */
99*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR > 5 || (OS_MAJOR == 5 && OS_MINOR >= 8))
100*11038SRao.Shoaib@Sun.COM #define	USE_IFNAMELINKID
101*11038SRao.Shoaib@Sun.COM #endif
102*11038SRao.Shoaib@Sun.COM 
103*11038SRao.Shoaib@Sun.COM #undef ALIGN
104*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR == 5 && OS_MINOR > 8)
105*11038SRao.Shoaib@Sun.COM #define	ALIGN(x) (((uintptr_t)(x) + (sizeof (char *) - 1UL)) & \
106*11038SRao.Shoaib@Sun.COM 		~(sizeof (char *) - 1UL))
107*11038SRao.Shoaib@Sun.COM #else
108*11038SRao.Shoaib@Sun.COM #define	ALIGN(x) (((unsigned long)(x) + (sizeof (char *) - 1UL)) & \
109*11038SRao.Shoaib@Sun.COM 		~(sizeof (char *) - 1UL))
110*11038SRao.Shoaib@Sun.COM #endif
111*11038SRao.Shoaib@Sun.COM 
112*11038SRao.Shoaib@Sun.COM #if (OS_MAJOR == 5 && OS_MINOR < 5)
113*11038SRao.Shoaib@Sun.COM #ifndef USE_FIONBIO_IOCTL
114*11038SRao.Shoaib@Sun.COM #define	USE_FIONBIO_IOCTL 1
115*11038SRao.Shoaib@Sun.COM #endif
116*11038SRao.Shoaib@Sun.COM #endif
117*11038SRao.Shoaib@Sun.COM 
118*11038SRao.Shoaib@Sun.COM 
119*11038SRao.Shoaib@Sun.COM #ifdef	__cplusplus
120*11038SRao.Shoaib@Sun.COM }
121*11038SRao.Shoaib@Sun.COM #endif
122*11038SRao.Shoaib@Sun.COM 
123*11038SRao.Shoaib@Sun.COM #endif	/* _SUNW_PORT_AFTER_H */
124