]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/solaris.h
2 * Copyright (C) 1996-2023 The Squid Software Foundation and contributors
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.
9 #ifndef SQUID_COMPAT_OS_SOLARIS_H
10 #define SQUID_COMPAT_OS_SOLARIS_H
14 /****************************************************************************
15 *--------------------------------------------------------------------------*
16 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
17 *--------------------------------------------------------------------------*
18 ****************************************************************************/
21 * ugly hack. System headers require wcsstr, but don't define it.
30 * On Solaris 9 x86, gcc may includes a "fixed" set of old system
31 * include files that is incompatible with the updated Solaris
34 #if defined(i386) || defined(__i386)
50 * prototypes for system function missing from system includes
51 * NP: sys/resource.h and sys/time.h are apparently order-dependant.
54 #include <sys/resource.h>
55 SQUIDCEXTERN
int getrusage(int, struct rusage
*);
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
61 #include <sys/socket.h>
65 * prototypes for system function missing from system includes
66 * on some Solaris systems.
68 SQUIDCEXTERN
int getpagesize(void);
69 #if !defined(_XPG4_2) && !(defined(__EXTENSIONS__) || \
70 (!defined(_POSIX_C_SOURCE) && !defined(_XOPEN_SOURCE)))
71 SQUIDCEXTERN
int gethostname(char *, int);
74 /* Bug 2500: Solaris 10/11 require s6_addr* defines. */
75 //#define s6_addr8 _S6_un._S6_u8
76 //#define s6_addr16 _S6_un._S6_u16
77 #define s6_addr32 _S6_un._S6_u32
79 /* Solaris 10 lacks SUN_LEN */
81 #define SUN_LEN(su) (sizeof(*(su)) - sizeof((su)->sun_path) + strlen((su)->sun_path))
84 /* Soaris 10 does not define POSIX AF_LOCAL, but does define the Unix name */
85 #if !defined(AF_LOCAL)
86 #define AF_LOCAL AF_UNIX
89 /* Solaris lacks paths.h by default */
93 #if !defined(_PATH_DEVNULL)
94 #define _PATH_DEVNULL "/dev/null"
97 #endif /* _SQUID_SOLARIS_ */
98 #endif /* SQUID_COMPAT_OS_SOLARIS_H */