]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/solaris.h
Compat: Suppress sprintf override on Solaris cppunit
[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 #ifndef HAVE_PAD128_T
18 typedef union {
19 long double _q;
20 int32_t _l[4];
21 } pad128_t;
22 #endif
23 #ifndef 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 */
34 #include <sys/resource.h>
35 SQUIDCEXTERN int getrusage(int, struct rusage *);
36
37
38 /**
39 * prototypes for system function missing from system includes
40 * on some Solaris systems.
41 */
42 SQUIDCEXTERN int getpagesize(void);
43 #if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
44 (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
45 SQUIDCEXTERN int gethostname(char *, int);
46 #endif
47
48 /*
49 * SunPro CC handles extern inline as inline, PLUS extern symbols.
50 */
51 #if !defined(_SQUID_EXTERNNEW_) && defined(__SUNPRO_CC)
52 #define _SQUID_EXTERNNEW_ extern
53 #endif
54
55 /*
56 * SunStudio CC does not define C++ portability API __FUNCTION__
57 */
58 #if defined(__SUNPRO_CC) && !defined(__FUNCTION__)
59 #define __FUNCTION__ ""
60 #endif
61
62 /* Exclude CPPUnit tests from the allocator restrictions. */
63 /* BSD implementation uses these still */
64 #if defined(SQUID_UNIT_TEST)
65 #define SQUID_NO_STRING_BUFFER_PROTECT 1
66 #endif
67
68
69 #endif /* _SQUID_SOLARIS_ */
70 #endif /* SQUID_OS_SOALRIS_H */