]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/linux.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_LINUX_H
10 #define SQUID_COMPAT_OS_LINUX_H
14 /****************************************************************************
15 *--------------------------------------------------------------------------*
16 * DO *NOT* MAKE ANY CHANGES below here unless you know what you're doing...*
17 *--------------------------------------------------------------------------*
18 ****************************************************************************/
21 #define _SQUID_LINUX_THREADS_
25 * res_init() is just a macro re-definition of __res_init on Linux (Debian/Ubuntu)
27 #if !defined(HAVE_RES_INIT) && defined(HAVE___RES_INIT) && !defined(res_init)
28 #define res_init __res_init
29 #define HAVE_RES_INIT HAVE___RES_INIT
33 * Netfilter header madness. (see Bug 4323)
35 * Netfilter have a history of defining their own versions of network protocol
36 * primitives without sufficient protection against the POSIX defines which are
37 * always present in Linux.
39 * netinet/in.h must be included before any other sys header in order to properly
40 * activate include guards in <linux/libc-compat.h> the kernel maintainers added
44 #include <netinet/in.h>
48 * glob.h is provided by GNU on Linux and contains some unavoidable preprocessor
49 * logic errors in its 64-bit definitions which are hit by non-GCC compilers.
51 * #if __USE_FILE_OFFSET64 && __GNUC__ < 2
52 * # define glob glob64
54 * #if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2
55 * extern "C" glob(...);
57 * extern "C" glob64(...);
59 * ... and multiple "C" definitions of glob64 refuse to compile.
60 * Because __GNUC__ being undefined equates to 0 and (0 < 2)
62 #if __USE_FILE_OFFSET64 && __GNUC__ < 2
71 #endif /* _SQUID_LINUX_ */
72 #endif /* SQUID_COMPAT_OS_LINUX_H */