osdetect.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_COMPAT_OSDETECT_H
10#define SQUID_COMPAT_OSDETECT_H
11
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
25/* SUN SOLARIS / OPENSOLARIS */
26#if defined(__sun__) || defined(__sun) || defined(__SUNPRO_CC) || defined(__SunOS_OSversion)
27
28#if defined(__SVR4) /* Solaris */
29#define _SQUID_SOLARIS_ 1
30#else /* SunOS */
31#define _SQUID_SUNOS_ 1
32#endif /* __SVR4 */
33
34#elif defined(__hpux) /* HP-UX - SysV-like? */
35#define _SQUID_HPUX_ 1
36
37#elif defined(__osf__) /* OSF/1 */
38#define _SQUID_OSF_ 1
39
40#elif defined(_AIX) /* AIX */
41#define _SQUID_AIX_ 1
42
43#elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */
44#define _SQUID_LINUX_ 1
45
46#elif defined(__FreeBSD__) /* FreeBSD */
47#define _SQUID_FREEBSD_ 1
48
49#elif defined(__FreeBSD_kernel__) /* GNU/kFreeBSD */
50#define _SQUID_KFREEBSD_ 1
51
52#elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */
53#define _SQUID_SGI_ 1
54
55#elif defined(__NetBSD__)
56#define _SQUID_NETBSD_ 1
57
58#elif defined(__OpenBSD__)
59#define _SQUID_OPENBSD_ 1
60
61#elif defined(__DragonFly__)
62#define _SQUID_DRAGONFLY_ 1
63
64#elif defined(__CYGWIN__)
65#define _SQUID_CYGWIN_ 1
66
67#elif defined(__MINGW32__) || defined(__MINGW__)
68#define _SQUID_MINGW_ 1
69
70#elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
71#define _SQUID_WINDOWS_ 1
72
73#elif defined(__APPLE__)
74#define _SQUID_APPLE_ 1
75
76#elif defined(sony_news) && defined(__svr4)
77#define _SQUID_NEWSOS6_ 1
78
79#elif defined(__QNX__)
80#define _SQUID_QNX_ 1
81
82#elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
83#define _SQUID_OS2_ 1
84
85#endif /* OS automatic detection */
86
87#endif /* SQUID_COMPAT_OSDETECT_H */
88

 

Introduction

Documentation

Support

Miscellaneous

Web Site Translations

Mirrors