1 // 2 // Types.h 3 // 4 // Library: Foundation 5 // Package: Core 6 // Module: Types 7 // 8 // Definitions of fixed-size integer types for various platforms 9 // 10 // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH. 11 // and Contributors. 12 // 13 // SPDX-License-Identifier: BSL-1.0 14 // 15 16 17 #ifndef Foundation_Types_INCLUDED 18 #define Foundation_Types_INCLUDED 19 20 21 #include "Poco/Foundation.h" 22 #include <cstdint> 23 24 25 namespace Poco { 26 27 28 using Int8 = std::int8_t; 29 using UInt8 = std::uint8_t; 30 using Int16 = std::int16_t; 31 using UInt16 = std::uint16_t; 32 using Int32 = std::int32_t; 33 using UInt32 = std::uint32_t; 34 using Int64 = std::int64_t; 35 using UInt64 = std::uint64_t; 36 using IntPtr = std::intptr_t; 37 using UIntPtr = std::uintptr_t; 38 39 40 #if defined(_MSC_VER) 41 #if defined(_WIN64) 42 #define POCO_PTR_IS_64_BIT 1 43 #endif 44 #define POCO_HAVE_INT64 1 45 #elif defined(__GNUC__) || defined(__clang__) 46 #if defined(_WIN64) 47 #define POCO_PTR_IS_64_BIT 1 48 #else 49 #if defined(__LP64__) 50 #define POCO_PTR_IS_64_BIT 1 51 #define POCO_LONG_IS_64_BIT 1 52 #if POCO_OS == POCO_OS_LINUX || POCO_OS == POCO_OS_FREE_BSD || POCO_OS == POCO_OS_ANDROID 53 #define POCO_INT64_IS_LONG 1 54 #endif 55 #endif 56 #endif 57 #define POCO_HAVE_INT64 1 58 #elif defined(__SUNPRO_CC) 59 #if defined(__sparcv9) 60 #define POCO_PTR_IS_64_BIT 1 61 #define POCO_LONG_IS_64_BIT 1 62 #endif 63 #define POCO_HAVE_INT64 1 64 #elif defined(__IBMCPP__) 65 #if defined(__64BIT__) 66 #define POCO_PTR_IS_64_BIT 1 67 #define POCO_LONG_IS_64_BIT 1 68 #endif 69 #define POCO_HAVE_INT64 1 70 #elif defined(_DIAB_TOOL) 71 #define POCO_HAVE_INT64 1 72 #endif 73 74 75 } // namespace Poco 76 77 78 #endif // Foundation_Types_INCLUDED 79