fix mingw compile errors

This commit is contained in:
Joao Paulo Magalhaes 2020-11-20 00:26:33 +00:00
parent f7b13da349
commit bfa33b3ed1
2 changed files with 7 additions and 3 deletions

View File

@ -131,7 +131,7 @@ fastfloat_really_inline int leading_zeroes(uint64_t input_num) {
#ifdef FASTFLOAT_32BIT
#if !defined(_WIN32)
#if (!defined(_WIN32)) || defined(__MINGW32__)
// slow emulation routine for 32-bit
fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) {
return x * (uint64_t)y;
@ -139,6 +139,7 @@ fastfloat_really_inline uint64_t __emulu(uint32_t x, uint32_t y) {
#endif
// slow emulation routine for 32-bit
#if !defined(__MINGW64__)
fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd,
uint64_t *hi) {
uint64_t ad = __emulu((uint32_t)(ab >> 32), (uint32_t)cd);
@ -150,6 +151,8 @@ fastfloat_really_inline uint64_t _umul128(uint64_t ab, uint64_t cd,
(adbc_carry << 32) + !!(lo < bd);
return lo;
}
#endif // !__MINGW64__
#endif // FASTFLOAT_32BIT

View File

@ -1,9 +1,10 @@
#include "fast_float/fast_float.h"
#include <iomanip>
#define DOCTEST_CONFIG_SUPER_FAST_ASSERTS
#define DOCTEST_CONFIG_IMPLEMENT_WITH_MAIN
#include <doctest/doctest.h>
#include "fast_float/fast_float.h"
#include <iomanip>
TEST_CASE("leading_zeroes") {
constexpr const uint64_t bit = 1;