]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/solaris.h
5 #ifndef SQUID_OS_SOLARIS_H
6 #define SQUID_OS_SOLARIS_H
13 * ugly hack. System headers require wcsstr, but don't define it.
22 * On Solaris 9 x86, gcc may includes a "fixed" set of old system
23 * include files that is incompatible with the updated Solaris
26 #if defined(i386) || defined(__i386)
42 * prototypes for system function missing from system includes
43 * NP: sys/resource.h and sys/time.h are apparently order-dependant.
46 #include <sys/resource.h>
47 SQUIDCEXTERN
int getrusage(int, struct rusage
*);
51 * prototypes for system function missing from system includes
52 * on some Solaris systems.
54 SQUIDCEXTERN
int getpagesize(void);
55 #if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
56 (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
57 SQUIDCEXTERN
int gethostname(char *, int);
61 * SunPro CC handles extern inline as inline, PLUS extern symbols.
63 #if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC)
64 #define _SQUID_EXTERNNEW_ extern
68 * SunStudio CC does not define C++ portability API __FUNCTION__
70 #if defined(__SUNPRO_CC) && !defined(__FUNCTION__)
71 #define __FUNCTION__ ""
74 /* Exclude CPPUnit tests from the allocator restrictions. */
75 /* BSD implementation uses these still */
76 #if defined(SQUID_UNIT_TEST)
77 #define SQUID_NO_STRING_BUFFER_PROTECT 1
80 /* Bug 2500: Solaris 10/11 require s6_addr* defines. */
81 //#define s6_addr8 _S6_un._S6_u8
82 //#define s6_addr16 _S6_un._S6_u16
83 #define s6_addr32 _S6_un._S6_u32
85 /* Bug 3057: Solaris 9 defines struct addrinfo with size_t instead of socklen_t
86 * this causes binary incompatibility on 64-bit systems.
87 * Fix this by bundling a copy of the OpenSolaris 10 netdb.h to use instead.
89 #if defined(__sparcv9)
90 #include "compat/os/opensolaris_10_netdb.h"
93 /* Solaris lacks paths.h by default */
97 #if !defined(_PATH_DEVNULL)
98 #define _PATH_DEVNULL "/dev/null"
101 #endif /* _SQUID_SOLARIS_ */
102 #endif /* SQUID_OS_SOALRIS_H */