]> git.ipfire.org Git - thirdparty/squid.git/blob - compat/osdetect.h
258e082ac34bf83db254db8d219518a07db3caf6
[thirdparty/squid.git] / compat / osdetect.h
1 #ifndef SQUID_COMPAT_OSDETECT_H
2 #define SQUID_COMPAT_OSDETECT_H
3
4
5 /****************************************************************************
6 *--------------------------------------------------------------------------*
7 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
8 *--------------------------------------------------------------------------*
9 ****************************************************************************/
10
11 /*
12 * Define the _SQUID_TYPE_ based on a guess of the OS.
13 *
14 * NP: This MUST come first in compat.h with no OS-specific includes
15 * or other definitions within this if-else structure.
16 */
17
18 /* SUN SOLARIS / OPENSOLARIS */
19 #if defined(__sun__) || defined(__sun) || defined(__SUNPRO_CC) || defined(__SunOS_OSversion)
20 #define _SQUID_SUN_ 1 /* SunOS */
21
22 #if defined(__SVR4) /* Solaris */
23 #define _SQUID_SOLARIS_ 1
24 #else /* SunOS */
25 #define _SQUID_SUNOS_ 1
26 #endif /* __SVR4 */
27
28 #elif defined(__hpux) /* HP-UX - SysV-like? */
29 #define _SQUID_HPUX_ 1
30 #define _SQUID_SYSV_ 1
31
32 #elif defined(__osf__) /* OSF/1 */
33 #define _SQUID_OSF_ 1
34
35 #elif defined(__ultrix) /* Ultrix */
36 #define _SQUID_ULTRIX_ 1
37
38 #elif defined(_AIX) /* AIX */
39 #define _SQUID_AIX_ 1
40
41 #elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */
42 #define _SQUID_LINUX_ 1
43
44 #elif defined(__FreeBSD__) /* FreeBSD */
45 #define _SQUID_FREEBSD_ 1
46
47 #elif defined(__FreeBSD_kernel__) /* GNU/kFreeBSD */
48 #define _SQUID_KFREEBSD_ 1
49
50 #elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */
51 #define _SQUID_SGI_ 1
52
53 #elif defined(__NeXT__)
54 #define _SQUID_NEXT_ 1
55
56 #elif defined(__bsdi__) /* BSD/OS */
57 #define _SQUID_BSDI_ 1
58
59 #elif defined(__NetBSD__)
60 #define _SQUID_NETBSD_ 1
61
62 #elif defined(__OpenBSD__)
63 #define _SQUID_OPENBSD_ 1
64
65 #elif defined(__DragonFly__)
66 #define _SQUID_DRAGONFLY_ 1
67
68 #elif defined(__CYGWIN32__) || defined(__CYGWIN__)
69 #define _SQUID_CYGWIN_ 1
70 #define _SQUID_WINDOWS_ 1
71
72 #elif defined(__MINGW32__) || defined(__MINGW__)
73 #define _SQUID_MINGW_ 1
74 #define _SQUID_WINDOWS_ 1
75
76 #elif defined(WIN32) || defined(WINNT) || defined(__WIN32__) || defined(__WIN32)
77 /* We are using _SQUID_MSWIN_ define in cf.data.pre, so
78 it must be defined to 1 to avoid the build failure of cfgen.
79 */
80 #define _SQUID_MSWIN_ 1
81 #define _SQUID_WINDOWS_ 1
82
83 #elif defined(__APPLE__)
84 #define _SQUID_APPLE_ 1
85
86 #elif defined(sony_news) && defined(__svr4)
87 #define _SQUID_NEWSOS6_ 1
88
89 #elif defined(__QNX__)
90 #define _SQUID_QNX_ 1
91
92 #elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
93 #define _SQUID_OS2_ 1
94
95 #endif /* OS automatic detection */
96
97
98
99 #endif /* SQUID_COMPAT_OSDETECT_H */