1
0
mirror of https://github.com/sqlite/sqlite.git synced 2025-07-29 08:01:23 +03:00

Fix compilation issues with MSVC.

FossilOrigin-Name: af07d8458ae5e2933134b706f80f9538f011970221904bf9f50ed6e47d306e14
This commit is contained in:
mistachkin
2020-08-04 16:11:37 +00:00
parent 53218e2e2c
commit cec5f1d127
4 changed files with 35 additions and 1890 deletions

View File

@ -82,6 +82,7 @@ typedef unsigned int u32;
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <stdlib.h>
/* The following macro is used to suppress compiler warnings.
*/
@ -419,6 +420,23 @@ struct RtreeMatchArg {
# define testcase(X)
#endif
/*
** Make sure that the compiler intrinsics we desire are enabled when
** compiling with an appropriate version of MSVC unless prevented by
** the SQLITE_DISABLE_INTRINSIC define.
*/
#if !defined(SQLITE_DISABLE_INTRINSIC)
# if defined(_MSC_VER) && _MSC_VER>=1400
# if !defined(_WIN32_WCE)
# include <intrin.h>
# pragma intrinsic(_byteswap_ulong)
# pragma intrinsic(_byteswap_uint64)
# else
# include <cmnintrin.h>
# endif
# endif
#endif
/*
** Macros to determine whether the machine is big or little endian,
** and whether or not that determination is run-time or compile-time.