]>
git.ipfire.org Git - thirdparty/squid.git/blob - compat/types.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.
13 * Here are defined several known-width types, obtained via autoconf
14 * from system locations or various attempts. This is just a convenience
15 * header to include which takes care of proper preprocessor stuff
17 * This file is only intended to be included via compat/compat.h, do
18 * not include directly.
21 /* This should be in synch with what we have in acinclude.m4 */
23 #include <sys/types.h>
25 #if HAVE_LINUX_TYPES_H
26 #include <linux/types.h>
37 #if HAVE_SYS_BITYPES_H
38 #include <sys/bitypes.h>
41 #include <sys/select.h>
43 #if HAVE_NETINET_IN_SYSTM_H
44 /* Several OS require types declared by in_systm.h without including it themselves. */
45 #include <netinet/in_systm.h>
48 /******************************************************/
49 /* Typedefs for missing entries on a system */
50 /******************************************************/
53 * ISO C99 Standard printf() macros for 64 bit integers
54 * On some 64 bit platform, HP Tru64 is one, for printf must be used
55 * "%lx" instead of "%llx"
60 #elif SIZEOF_INT64_T > SIZEOF_LONG
70 #elif SIZEOF_INT64_T > SIZEOF_LONG
80 #elif SIZEOF_INT64_T > SIZEOF_LONG
88 // NP: configure checks for support of %zu and defines where possible
89 #if SIZEOF_SIZE_T == 4 && _SQUID_MINGW_
90 #define PRIuSIZE "I32u"
91 #elif SIZEOF_SIZE_T == 4
93 #elif SIZEOF_SIZE_T == 8 && _SQUID_MINGW_
94 #define PRIuSIZE "I64u"
95 #elif SIZEOF_SIZE_T == 8
98 #error size_t is not 32-bit or 64-bit
100 #endif /* PRIuSIZE */
103 typedef unsigned short mode_t
;
107 typedef unsigned long fd_mask
;
110 #ifndef HAVE_SOCKLEN_T
111 typedef int socklen_t
;
119 #if defined(__cplusplus) && HAVE_NULLPTR
126 #endif /* SQUID_TYPES_H */