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