]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/solaris.h
Merged from autoconf-refactor.
[thirdparty/squid.git] / compat / os / solaris.h
1 #ifndef SQUID_CONFIG_H
2 #include "config.h"
3 #endif
4
5 #ifndef SQUID_OS_SOLARIS_H
6 #define SQUID_OS_SOLARIS_H
7
8
9 #if _SQUID_SOLARIS_
10
11 /*
12 * On Solaris 9 x86, gcc may includes a "fixed" set of old system
13 * include files that is incompatible with the updated Solaris
14 * header files.
15 */
16 #if defined(i386) || defined(__i386)
17 #if !HAVE_PAD128_T
18 typedef union {
19 long double _q;
20 int32_t _l[4];
21 } pad128_t;
22 #endif
23 #if !HAVE_UPAD128_T
24 typedef union {
25 long double _q;
26 uint32_t _l[4];
27 } upad128_t;
28 #endif
29 #endif
30
31 /**
32 * prototypes for system function missing from system includes
33 * NP: sys/resource.h and sys/time.h are apparently order-dependant.
34 */
35 #include <sys/time.h>
36 #include <sys/resource.h>
37 SQUIDCEXTERN int getrusage(int, struct rusage *);
38
39
40 /**
41 * prototypes for system function missing from system includes
42 * on some Solaris systems.
43 */
44 SQUIDCEXTERN int getpagesize(void);
45 #if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
46 (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
47 SQUIDCEXTERN int gethostname(char *, int);
48 #endif
49
50 /*
51 * SunPro CC handles extern inline as inline, PLUS extern symbols.
52 */
53 #if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC)
54 #define _SQUID_EXTERNNEW_ extern
55 #endif
56
57 /*
58 * SunStudio CC does not define C++ portability API __FUNCTION__
59 */
60 #if defined(__SUNPRO_CC) && !defined(__FUNCTION__)
61 #define __FUNCTION__ ""
62 #endif
63
64 /* Exclude CPPUnit tests from the allocator restrictions. */
65 /* BSD implementation uses these still */
66 #if defined(SQUID_UNIT_TEST)
67 #define SQUID_NO_STRING_BUFFER_PROTECT 1
68 #endif
69
70
71 #endif /* _SQUID_SOLARIS_ */
72 #endif /* SQUID_OS_SOALRIS_H */