]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/osdetect.h
258e082ac34bf83db254db8d219518a07db3caf6
1 #ifndef SQUID_COMPAT_OSDETECT_H
2 #define SQUID_COMPAT_OSDETECT_H
5 /****************************************************************************
6 *--------------------------------------------------------------------------*
7 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
8 *--------------------------------------------------------------------------*
9 ****************************************************************************/
12 * Define the _SQUID_TYPE_ based on a guess of the OS.
14 * NP: This MUST come first in compat.h with no OS-specific includes
15 * or other definitions within this if-else structure.
18 /* SUN SOLARIS / OPENSOLARIS */
19 #if defined(__sun__) || defined(__sun) || defined(__SUNPRO_CC) || defined(__SunOS_OSversion)
20 #define _SQUID_SUN_ 1 /* SunOS */
22 #if defined(__SVR4) /* Solaris */
23 #define _SQUID_SOLARIS_ 1
25 #define _SQUID_SUNOS_ 1
28 #elif defined(__hpux) /* HP-UX - SysV-like? */
29 #define _SQUID_HPUX_ 1
30 #define _SQUID_SYSV_ 1
32 #elif defined(__osf__) /* OSF/1 */
35 #elif defined(__ultrix) /* Ultrix */
36 #define _SQUID_ULTRIX_ 1
38 #elif defined(_AIX) /* AIX */
41 #elif defined(__linux__) /* Linux. WARNING: solaris-x86 also sets this */
42 #define _SQUID_LINUX_ 1
44 #elif defined(__FreeBSD__) /* FreeBSD */
45 #define _SQUID_FREEBSD_ 1
47 #elif defined(__FreeBSD_kernel__) /* GNU/kFreeBSD */
48 #define _SQUID_KFREEBSD_ 1
50 #elif defined(__sgi__) || defined(sgi) || defined(__sgi) /* SGI */
53 #elif defined(__NeXT__)
54 #define _SQUID_NEXT_ 1
56 #elif defined(__bsdi__) /* BSD/OS */
57 #define _SQUID_BSDI_ 1
59 #elif defined(__NetBSD__)
60 #define _SQUID_NETBSD_ 1
62 #elif defined(__OpenBSD__)
63 #define _SQUID_OPENBSD_ 1
65 #elif defined(__DragonFly__)
66 #define _SQUID_DRAGONFLY_ 1
68 #elif defined(__CYGWIN32__) || defined(__CYGWIN__)
69 #define _SQUID_CYGWIN_ 1
70 #define _SQUID_WINDOWS_ 1
72 #elif defined(__MINGW32__) || defined(__MINGW__)
73 #define _SQUID_MINGW_ 1
74 #define _SQUID_WINDOWS_ 1
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.
80 #define _SQUID_MSWIN_ 1
81 #define _SQUID_WINDOWS_ 1
83 #elif defined(__APPLE__)
84 #define _SQUID_APPLE_ 1
86 #elif defined(sony_news) && defined(__svr4)
87 #define _SQUID_NEWSOS6_ 1
89 #elif defined(__QNX__)
92 #elif defined(__EMX__) || defined(OS2) || defined(__OS2__)
95 #endif /* OS automatic detection */
99 #endif /* SQUID_COMPAT_OSDETECT_H */