]> git.ipfire.org Git - thirdparty/squid.git/blame - compat/osdetect.h
Source Format Enforcement (#532)
[thirdparty/squid.git] / compat / osdetect.h
CommitLineData
37be9888 1/*
77b1029d 2 * Copyright (C) 1996-2020 The Squid Software Foundation and contributors
37be9888
AJ
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
f04e1182
AJ
9#ifndef SQUID_COMPAT_OSDETECT_H
10#define SQUID_COMPAT_OSDETECT_H
11
f04e1182
AJ
12/****************************************************************************
13 *--------------------------------------------------------------------------*
14 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
15 *--------------------------------------------------------------------------*
16 ****************************************************************************/
17
18/*
19 * Define the _SQUID_TYPE_ based on a guess of the OS.
20 *
21 * NP: This MUST come first in compat.h with no OS-specific includes
22 * or other definitions within this if-else structure.
23 */
24
00177188
FC
25/* SUN SOLARIS / OPENSOLARIS */
26#if defined(__sun__) || defined(__sun) || defined(__SUNPRO_CC) || defined(__SunOS_OSversion)
dc7b4068
FC
27
28#if defined(__SVR4) /* Solaris */
00177188 29#define _SQUID_SOLARIS_ 1
dc7b4068
FC
30#else /* SunOS */
31#define _SQUID_SUNOS_ 1
32#endif /* __SVR4 */
f04e1182 33
f53969cc 34#elif defined(__hpux) /* HP-UX - SysV-like? */
00177188 35#define _SQUID_HPUX_ 1
f04e1182 36
f53969cc 37#elif defined(__osf__) /* OSF/1 */
00177188 38#define _SQUID_OSF_ 1
f04e1182 39
f53969cc 40#elif defined(_AIX) /* AIX */
00177188 41#define _SQUID_AIX_ 1
f04e1182 42
f53969cc 43#elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */
00177188 44#define _SQUID_LINUX_ 1
f04e1182 45
f53969cc 46#elif defined(__FreeBSD__) /* FreeBSD */
00177188 47#define _SQUID_FREEBSD_ 1
83cd15d9
AJ
48
49#elif defined(__FreeBSD_kernel__) /* GNU/kFreeBSD */
00177188 50#define _SQUID_KFREEBSD_ 1
f04e1182 51
f53969cc 52#elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */
00177188 53#define _SQUID_SGI_ 1
f04e1182
AJ
54
55#elif defined(__NeXT__)
00177188 56#define _SQUID_NEXT_ 1
f04e1182 57
f04e1182 58#elif defined(__NetBSD__)
00177188 59#define _SQUID_NETBSD_ 1
f04e1182
AJ
60
61#elif defined(__OpenBSD__)
00177188 62#define _SQUID_OPENBSD_ 1
f04e1182
AJ
63
64#elif defined(__DragonFly__)
00177188 65#define _SQUID_DRAGONFLY_ 1
f04e1182 66
a396d1f8 67#elif defined(__CYGWIN__)
00177188 68#define _SQUID_CYGWIN_ 1
f04e1182 69
4d63494d
AJ
70#elif defined(__MINGW32__) || defined(__MINGW__)
71#define _SQUID_MINGW_ 1
72#define _SQUID_WINDOWS_ 1
73
f04e1182 74#elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
be266cb2 75#define _SQUID_WINDOWS_ 1
f04e1182
AJ
76
77#elif defined(__APPLE__)
00177188 78#define _SQUID_APPLE_ 1
f04e1182
AJ
79
80#elif defined(sony_news) && defined(__svr4)
00177188 81#define _SQUID_NEWSOS6_ 1
f04e1182
AJ
82
83#elif defined(__QNX__)
00177188 84#define _SQUID_QNX_ 1
f04e1182
AJ
85
86#elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
00177188 87#define _SQUID_OS2_ 1
f04e1182
AJ
88
89#endif /* OS automatic detection */
90
f04e1182 91#endif /* SQUID_COMPAT_OSDETECT_H */
f53969cc 92