This fixes building on mingw-w64. Include stdint.h on everything except MSVC for definitions of common standard types, include stddef.h on MSVC instead, since MSVC doesn't have stdint.h in all older versions that are supposed to be supported, but MSVC always defines intptr_t via stddef.h.
Showing the changes to codec/processing (2 of 2 files). Show all
Unified · Split
| @@ -50,6 +50,12 @@ · 49 unmodified lines | |||
| 50 | #define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP { | 50 | #define WELSVP_NAMESPACE_BEGIN namespace nsWelsVP { |
| 51 | #define WELSVP_NAMESPACE_END } | 51 | #define WELSVP_NAMESPACE_END } |
| 52 | 52 | ||
| 53 | #ifdef _MSC_VER | ||
| 54 | #include <stddef.h> | ||
| 55 | #else | ||
| 56 | #include <stdint.h> | ||
| 57 | #endif | ||
| 58 | |||
| 53 | WELSVP_NAMESPACE_BEGIN | 59 | WELSVP_NAMESPACE_BEGIN |
| 54 | 60 | ||
| 55 | #if ( defined(_WIN32) || defined(_WIN32) ) && defined(_MSC_VER) | 61 | #if ( defined(_WIN32) || defined(_WIN32) ) && defined(_MSC_VER) |
| @@ -66,15 +72,6 @@ typedef unsigned __int64 uint64_t ; · 10 unmodified lines | |||
| 66 | 72 | ||
| 67 | #else // GCC | 73 | #else // GCC |
| 68 | 74 | ||
| 69 | typedef signed char int8_t | ||
| 70 | ; // [comment]: some compilers may identify the type "char" as "unsigned char" as default, so declare it explicit | ||
| 71 | typedef unsigned char uint8_t ; | ||
| 72 | typedef signed short int16_t ; | ||
| 73 | typedef unsigned short uint16_t ; | ||
| 74 | typedef signed int int32_t ; | ||
| 75 | typedef unsigned int uint32_t ; | ||
| 76 | typedef long long int64_t ; | ||
| 77 | typedef unsigned long long uint64_t ; | ||
| 78 | #define inline_t inline | 75 | #define inline_t inline |
| 79 | 76 | ||
| 80 | #endif | 77 | #endif |
| @@ -77,7 +77,7 @@ WELSVP_NAMESPACE_BEGIN · 76 unmodified lines | |||
| 77 | #define WELS_ALIGN4(iInput) ((iInput+3) & ~3) | 77 | #define WELS_ALIGN4(iInput) ((iInput+3) & ~3) |
| 78 | #define WELS_ALIGN8(iInput) ((iInput+7) & ~7) | 78 | #define WELS_ALIGN8(iInput) ((iInput+7) & ~7) |
| 79 | 79 | ||
| 80 | #define WelsCastFromPointer(p) (reinterpret_cast<long_t>(p)) | 80 | #define WelsCastFromPointer(p) (reinterpret_cast<intptr_t>(p)) |
| 81 | #define WelsStaticCast(type, p) (static_cast<type>(p)) | 81 | #define WelsStaticCast(type, p) (static_cast<type>(p)) |
| 82 | #define WelsDynamicCast(type, p) (dynamic_cast<type>(p)) | 82 | #define WelsDynamicCast(type, p) (dynamic_cast<type>(p)) |
| 83 | 83 | ||