13a289941SAaron LI /*
23a289941SAaron LI  * Copyright (c) 2002 - 2005 NetGroup, Politecnico di Torino (Italy)
33a289941SAaron LI  * Copyright (c) 2005 - 2009 CACE Technologies, Inc. Davis (California)
43a289941SAaron LI  * All rights reserved.
53a289941SAaron LI  *
63a289941SAaron LI  * Redistribution and use in source and binary forms, with or without
73a289941SAaron LI  * modification, are permitted provided that the following conditions
83a289941SAaron LI  * are met:
93a289941SAaron LI  *
103a289941SAaron LI  * 1. Redistributions of source code must retain the above copyright
113a289941SAaron LI  * notice, this list of conditions and the following disclaimer.
123a289941SAaron LI  * 2. Redistributions in binary form must reproduce the above copyright
133a289941SAaron LI  * notice, this list of conditions and the following disclaimer in the
143a289941SAaron LI  * documentation and/or other materials provided with the distribution.
153a289941SAaron LI  * 3. Neither the name of the Politecnico di Torino nor the names of its
163a289941SAaron LI  * contributors may be used to endorse or promote products derived from
173a289941SAaron LI  * this software without specific prior written permission.
183a289941SAaron LI  *
193a289941SAaron LI  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
203a289941SAaron LI  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
213a289941SAaron LI  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
223a289941SAaron LI  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
233a289941SAaron LI  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
243a289941SAaron LI  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
253a289941SAaron LI  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
263a289941SAaron LI  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
273a289941SAaron LI  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
283a289941SAaron LI  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
293a289941SAaron LI  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
303a289941SAaron LI  */
313a289941SAaron LI #ifndef pcap_pcap_inttypes_h
323a289941SAaron LI #define pcap_pcap_inttypes_h
333a289941SAaron LI 
343a289941SAaron LI /*
35*ea16f64eSAntonio Huete Jimenez  * If we're compiling with Visual Studio, make sure we have at least
36*ea16f64eSAntonio Huete Jimenez  * VS 2015 or later, so we have sufficient C99 support.
37*ea16f64eSAntonio Huete Jimenez  *
38*ea16f64eSAntonio Huete Jimenez  * XXX - verify that we have at least C99 support on UN*Xes?
39*ea16f64eSAntonio Huete Jimenez  *
40*ea16f64eSAntonio Huete Jimenez  * What about MinGW or various DOS toolchains?  We're currently assuming
41*ea16f64eSAntonio Huete Jimenez  * sufficient C99 support there.
423a289941SAaron LI  */
433a289941SAaron LI #if defined(_MSC_VER)
443a289941SAaron LI   /*
45*ea16f64eSAntonio Huete Jimenez    * Compiler is MSVC.  Make sure we have VS 2015 or later.
463a289941SAaron LI    */
47*ea16f64eSAntonio Huete Jimenez   #if _MSC_VER < 1900
48*ea16f64eSAntonio Huete Jimenez     #error "Building libpcap requires VS 2015 or later"
493a289941SAaron LI   #endif
503a289941SAaron LI #endif
513a289941SAaron LI 
523a289941SAaron LI /*
53*ea16f64eSAntonio Huete Jimenez  * Include <inttypes.h> to get the integer types and PRi[doux]64 values
54*ea16f64eSAntonio Huete Jimenez  * defined.
553a289941SAaron LI  *
56*ea16f64eSAntonio Huete Jimenez  * If the compiler is MSVC, we require VS 2015 or newer, so we
57*ea16f64eSAntonio Huete Jimenez  * have <inttypes.h> - and support for %zu in the formatted
58*ea16f64eSAntonio Huete Jimenez  * printing functions.
593a289941SAaron LI  *
60*ea16f64eSAntonio Huete Jimenez  * If the compiler is MinGW, we assume we have <inttypes.h> - and
61*ea16f64eSAntonio Huete Jimenez  * support for %zu in the formatted printing functions.
62*ea16f64eSAntonio Huete Jimenez  *
63*ea16f64eSAntonio Huete Jimenez  * If the target is UN*X, we assume we have a C99-or-later development
64*ea16f64eSAntonio Huete Jimenez  * environment, and thus have <inttypes.h> - and support for %zu in
65*ea16f64eSAntonio Huete Jimenez  * the formatted printing functions.
66*ea16f64eSAntonio Huete Jimenez  *
67*ea16f64eSAntonio Huete Jimenez  * If the target is MS-DOS, we assume we have <inttypes.h> - and support
68*ea16f64eSAntonio Huete Jimenez  * for %zu in the formatted printing functions.
69*ea16f64eSAntonio Huete Jimenez  *
70*ea16f64eSAntonio Huete Jimenez  * I.e., assume we have <inttypes.h> and that it suffices.
713a289941SAaron LI  */
723a289941SAaron LI 
733a289941SAaron LI /*
74*ea16f64eSAntonio Huete Jimenez  * XXX - somehow make sure we have enough C99 support with other
75*ea16f64eSAntonio Huete Jimenez  * compilers and support libraries?
763a289941SAaron LI  */
77*ea16f64eSAntonio Huete Jimenez 
783a289941SAaron LI #include <inttypes.h>
793a289941SAaron LI 
803a289941SAaron LI #endif /* pcap/pcap-inttypes.h */
81