solaris.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
3 *
4 * Squid software is distributed under GPLv2+ license and includes
5 * contributions from numerous individuals and organizations.
6 * Please see the COPYING and CONTRIBUTORS files for details.
7 */
8
9#ifndef SQUID_OS_SOLARIS_H
10#define SQUID_OS_SOLARIS_H
11
12#if _SQUID_SOLARIS_
13
14/****************************************************************************
15 *--------------------------------------------------------------------------*
16 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
17 *--------------------------------------------------------------------------*
18 ****************************************************************************/
19
20/*
21 * ugly hack. System headers require wcsstr, but don't define it.
22 */
23#include <wchar.h>
24#ifdef wcsstr
25#undef wcsstr
26#endif /* wcsstr */
27#define wcsstr wcswcs
28
29/*
30 * On Solaris 9 x86, gcc may includes a "fixed" set of old system
31 * include files that is incompatible with the updated Solaris
32 * header files.
33 */
34#if defined(i386) || defined(__i386)
35#if !HAVE_PAD128_T
36typedef union {
37 long double _q;
38 int32_t _l[4];
39} pad128_t;
40#endif
41#if !HAVE_UPAD128_T
42typedef union {
43 long double _q;
44 uint32_t _l[4];
45} upad128_t;
46#endif
47#endif
48
53#include <sys/time.h>
54#include <sys/resource.h>
55SQUIDCEXTERN int getrusage(int, struct rusage *);
56
57#if defined(__SUNPRO_CC)
58// Solaris 11 needs this before <sys/socket.h> to get the definition for msg_control
59// and possibly other type definitions we do not know about specifically
60#define _XPG4_2 1
61#include <sys/socket.h>
62#endif
63
68SQUIDCEXTERN int getpagesize(void);
69#if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
70(!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
71SQUIDCEXTERN int gethostname(char *, int);
72#endif
73
74/*
75 * SunStudio CC does not define C++ portability API __FUNCTION__
76 */
77#if defined(__SUNPRO_CC) && !defined(__FUNCTION__)
78#define __FUNCTION__ ""
79#endif
80
81/* Bug 2500: Solaris 10/11 require s6_addr* defines. */
82//#define s6_addr8 _S6_un._S6_u8
83//#define s6_addr16 _S6_un._S6_u16
84#define s6_addr32 _S6_un._S6_u32
85
86/* Solaris 10 lacks SUN_LEN */
87#if !defined(SUN_LEN)
88#define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
89#endif
90
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
94#endif
95
96/* Solaris lacks paths.h by default */
97#if HAVE_PATHS_H
98#include <paths.h>
99#endif
100#if !defined(_PATH_DEVNULL)
101#define _PATH_DEVNULL "/dev/null"
102#endif
103
104#endif /* _SQUID_SOLARIS_ */
105#endif /* SQUID_OS_SOALRIS_H */
106
#define SQUIDCEXTERN
Definition: squid.h:21

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors