2 * Licensed to the Apache Software Foundation (ASF) under one
3 * or more contributor license agreements. See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership. The ASF licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License. You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied. See the License for the
16 * specific language governing permissions and limitations
20 #ifndef _THRIFT_WINDOWS_CONFIG_H_
21 #define _THRIFT_WINDOWS_CONFIG_H_ 1
23 #if defined(_MSC_VER) && (_MSC_VER > 1200)
28 #error "This is a Windows header only"
35 #define strtoll(begin_ptr, end_ptr, length) _strtoi64(begin_ptr, end_ptr, length)
40 // squelch deprecation warnings
41 #pragma warning(disable : 4996)
42 // squelch bool conversion performance warning
43 #pragma warning(disable : 4800)
45 // MSVC10 (2010) or later has stdint.h
47 #define HAVE_STDINT_H 1
50 // Must be using VS2010 or later, or boost, so that C99 types are defined in the global namespace
54 #include <boost/cstdint.hpp>
56 typedef boost::int64_t int64_t;
57 typedef boost::uint64_t uint64_t;
58 typedef boost::int32_t int32_t;
59 typedef boost::uint32_t uint32_t;
60 typedef boost::int16_t int16_t;
61 typedef boost::uint16_t uint16_t;
62 typedef boost::int8_t int8_t;
63 typedef boost::uint8_t uint8_t;
66 #endif // _THRIFT_WINDOWS_CONFIG_H_