windows
parent
2b4b7bcdf9
commit
43cf8c0ba1
|
@ -88,7 +88,9 @@ add_library(${BLT_TARGET} ${STD_FILES} ${PROFILING_FILES} ${FS_FILES} ${PARSE_FI
|
|||
if(${ZLIB_FOUND})
|
||||
target_link_libraries(${BLT_TARGET} PUBLIC ZLIB::ZLIB)
|
||||
endif()
|
||||
if (!MSVC)
|
||||
target_link_libraries(${BLT_TARGET} PUBLIC stdc++fs)
|
||||
endif()
|
||||
|
||||
target_include_directories(${BLT_TARGET} PUBLIC include/)
|
||||
target_include_directories(${BLT_TARGET} PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/config/)
|
||||
|
|
|
@ -31,8 +31,10 @@ namespace blt
|
|||
return ((seed * (seed * seed * 15731 + 789221) + 1376312589) & 0x7fffffff);
|
||||
}
|
||||
|
||||
#ifdef __GCC__
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* fast inverse sqrt
|
||||
|
@ -51,8 +53,10 @@ namespace blt
|
|||
return y;
|
||||
}
|
||||
|
||||
#ifdef __GCC
|
||||
#pragma GCC diagnostic pop
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static inline constexpr double pow(int b, int p)
|
||||
{
|
||||
|
|
|
@ -27,11 +27,19 @@
|
|||
|
||||
#if defined(__clang__) || defined(__llvm__) || defined(__GNUC__) || defined(__GNUG__)
|
||||
|
||||
#include <byteswap.h>
|
||||
#if defined(__GNUC__) || defined(__GNUG__)
|
||||
#include <byteswap.h>
|
||||
|
||||
#define SWAP16(val) bswap_16(val)
|
||||
#define SWAP32(val) bswap_32(val)
|
||||
#define SWAP64(val) bswap_64(val)
|
||||
#else
|
||||
#define SWAP16(val) __builtin_bswap16(val)
|
||||
#define SWAP32(val) __builtin_bswap32(val)
|
||||
#define SWAP64(val) __builtin_bswap64(val)
|
||||
#endif
|
||||
|
||||
|
||||
#define SWAP16(val) bswap_16(val)
|
||||
#define SWAP32(val) bswap_32(val)
|
||||
#define SWAP64(val) bswap_64(val)
|
||||
#if __cplusplus >= 202002L
|
||||
|
||||
#include <bit>
|
||||
|
|
|
@ -144,6 +144,10 @@ namespace blt::system
|
|||
// number of dirty pages (0)
|
||||
std::uint64_t dt;
|
||||
};
|
||||
|
||||
#ifdef _MSC_VER
|
||||
using suseconds_t = std::size_t;
|
||||
#endif
|
||||
|
||||
struct timeval {
|
||||
time_t tv_sec; /* Seconds */
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
#define BLT_TYPES_H
|
||||
|
||||
#include <cstdint>
|
||||
#include <cstddef>
|
||||
|
||||
#ifndef NO_BLT_NAMESPACE_ON_TYPES
|
||||
namespace blt
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <iterator>
|
||||
#include <blt/std/memory_util.h>
|
||||
#include "ranges.h"
|
||||
#include <stdexcept>
|
||||
|
||||
namespace blt
|
||||
{
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 401552da80b0971f818e648621260720ad40934e
|
||||
Subproject commit 67c24619e4f5ab2097b74cc397732c17a25d6944
|
|
@ -6,10 +6,15 @@
|
|||
#include <blt/std/system.h>
|
||||
#include <blt/std/logging.h>
|
||||
|
||||
#ifndef _MSC_VER
|
||||
#include <sys/time.h> /* for struct timeval */
|
||||
#include <climits> /* for CLK_TCK */
|
||||
|
||||
#include <sys/resource.h>
|
||||
#else
|
||||
#include <windows.h>
|
||||
#define RUSAGE_SELF 1
|
||||
#endif
|
||||
|
||||
#include <climits> /* for CLK_TCK */
|
||||
#include <cstring>
|
||||
|
||||
#ifndef WIN32
|
||||
|
|
Loading…
Reference in New Issue