]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/os/linux.h
2 * Copyright (C) 1996-2014 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_OS_LINUX_H
10 #define SQUID_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 * sys/capability.h is only needed in Linux apparently.
35 * HACK: LIBCAP_BROKEN Ugly glue to get around linux header madness colliding with glibc
37 #if HAVE_SYS_CAPABILITY_H
41 #define _LINUX_TYPES_H
43 typedef uint32_t __u32
;
46 #include <sys/capability.h>
47 #endif /* HAVE_SYS_CAPABILITY_H */
50 * glob.h is provided by GNU on Linux and contains some unavoidable preprocessor
51 * logic errors in its 64-bit definitions which are hit by non-GCC compilers.
53 * #if __USE_FILE_OFFSET64 && __GNUC__ < 2
54 * # define glob glob64
56 * #if !defined __USE_FILE_OFFSET64 || __GNUC__ < 2
57 * extern "C" glob(...);
59 * extern "C" glob64(...);
61 * ... and multiple "C" definitions of glob64 refuse to compile.
62 * Because __GNUC__ being undefined equates to 0 and (0 < 2)
64 #if __USE_FILE_OFFSET64 && __GNUC__ < 2
73 #endif /* _SQUID_LINUX_ */
74 #endif /* SQUID_OS_LINUX_H */