build: fixes for mingw support (#373)
This commit is contained in:
parent
0509c9a790
commit
d189145a01
|
|
@ -707,8 +707,8 @@ bool need_swap(std::ios_base &os)
|
||||||
|
|
||||||
void *q_aligned_malloc(size_t align, size_t size)
|
void *q_aligned_malloc(size_t align, size_t size)
|
||||||
{
|
{
|
||||||
#ifdef _mm_malloc
|
#ifdef _WIN32
|
||||||
return _mm_malloc(size, align);
|
return _aligned_malloc(size, align);
|
||||||
#elif __STDC_VERSION__ >= 201112L
|
#elif __STDC_VERSION__ >= 201112L
|
||||||
return aligned_alloc(align, size);
|
return aligned_alloc(align, size);
|
||||||
#else
|
#else
|
||||||
|
|
@ -722,8 +722,8 @@ void *q_aligned_malloc(size_t align, size_t size)
|
||||||
|
|
||||||
void q_aligned_free(void *ptr)
|
void q_aligned_free(void *ptr)
|
||||||
{
|
{
|
||||||
#ifdef _mm_malloc
|
#ifdef _WIN32
|
||||||
_mm_free(ptr);
|
_aligned_free(ptr);
|
||||||
#else
|
#else
|
||||||
free(ptr);
|
free(ptr);
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
#define WIN32_LEAN_AND_MEAN
|
#define WIN32_LEAN_AND_MEAN
|
||||||
#include <Windows.h>
|
#include <windows.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static std::unique_ptr<tbb::global_control> tbbGlobalControl;
|
static std::unique_ptr<tbb::global_control> tbbGlobalControl;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
|
#include <cstdint>
|
||||||
#include <cstring> // for memcpy()
|
#include <cstring> // for memcpy()
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,7 @@
|
||||||
|
|
||||||
#include <cfloat>
|
#include <cfloat>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
|
#include <cstdint>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue