]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/solaris.h
793e2662498cbe4ef2ff6ca054854fa69229b16c
1 #ifndef SQUID_OS_SOLARIS_H
2 #define SQUID_OS_SOLARIS_H
7 * ugly hack. System headers require wcsstr, but don't define it.
16 * On Solaris 9 x86, gcc may includes a "fixed" set of old system
17 * include files that is incompatible with the updated Solaris
20 #if defined(i386) || defined(__i386)
36 * prototypes for system function missing from system includes
37 * NP: sys/resource.h and sys/time.h are apparently order-dependant.
40 #include <sys/resource.h>
41 SQUIDCEXTERN
int getrusage(int, struct rusage
*);
44 * prototypes for system function missing from system includes
45 * on some Solaris systems.
47 SQUIDCEXTERN
int getpagesize(void);
48 #if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
49 (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
50 SQUIDCEXTERN
int gethostname(char *, int);
54 * SunPro CC handles extern inline as inline, PLUS extern symbols.
56 #if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC)
57 #define _SQUID_EXTERNNEW_ extern
61 * SunStudio CC does not define C++ portability API __FUNCTION__
63 #if defined(__SUNPRO_CC) && !defined(__FUNCTION__)
64 #define __FUNCTION__ ""
67 /* Exclude CPPUnit tests from the allocator restrictions. */
68 /* BSD implementation uses these still */
69 #if defined(SQUID_UNIT_TEST)
70 #define SQUID_NO_STRING_BUFFER_PROTECT 1
73 /* Bug 2500: Solaris 10/11 require s6_addr* defines. */
74 //#define s6_addr8 _S6_un._S6_u8
75 //#define s6_addr16 _S6_un._S6_u16
76 #define s6_addr32 _S6_un._S6_u32
78 /* Bug 3057: Solaris 9 defines struct addrinfo with size_t instead of socklen_t
79 * this causes binary incompatibility on 64-bit systems.
80 * Fix this by bundling a copy of the OpenSolaris 10 netdb.h to use instead.
82 #if defined(__sparcv9)
83 #include "compat/os/opensolaris_10_netdb.h"
86 /* Solaris 10 lacks SUN_LEN */
88 #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
91 /* Soaris 10 does not define POSIX AF_LOCAL, but does define the Unix name */
92 #if !defined(AF_LOCAL)
93 #define AF_LOCAL AF_UNIX
96 /* Solaris lacks paths.h by default */
100 #if !defined(_PATH_DEVNULL)
101 #define _PATH_DEVNULL "/dev/null"
104 /* Solaris 10 does not define strsep() */
105 #include "compat/strsep.h"
107 #endif /* _SQUID_SOLARIS_ */
108 #endif /* SQUID_OS_SOALRIS_H */