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:
@ -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.
|
||||
|
@ -1 +1 @@
|
||||
8cf342d4e5eb67b17aee595d9d75f7798eccaebc1ec88e646d344d8d4ab64977
|
||||
af07d8458ae5e2933134b706f80f9538f011970221904bf9f50ed6e47d306e14
|
@ -2273,7 +2273,7 @@ case OP_Compare: {
|
||||
#ifdef SQLITE_DEBUG
|
||||
if( aPermute ){
|
||||
int k, mx = 0;
|
||||
for(k=0; k<n; k++) if( aPermute[k]>mx ) mx = aPermute[k];
|
||||
for(k=0; k<n; k++) if( aPermute[k]>(u32)mx ) mx = aPermute[k];
|
||||
assert( p1>0 && p1+mx<=(p->nMem+1 - p->nCursor)+1 );
|
||||
assert( p2>0 && p2+mx<=(p->nMem+1 - p->nCursor)+1 );
|
||||
}else{
|
||||
@ -2623,7 +2623,7 @@ case OP_Column: {
|
||||
pDest = &aMem[pOp->p3];
|
||||
memAboutToChange(p, pDest);
|
||||
assert( pC!=0 );
|
||||
assert( p2<pC->nField );
|
||||
assert( p2<(u32)pC->nField );
|
||||
aOffset = pC->aOffset;
|
||||
assert( pC->eCurType!=CURTYPE_VTAB );
|
||||
assert( pC->eCurType!=CURTYPE_PSEUDO || pC->nullRow );
|
||||
@ -3812,7 +3812,7 @@ case OP_OpenWrite:
|
||||
}
|
||||
if( pOp->p5 & OPFLAG_P2ISREG ){
|
||||
assert( p2>0 );
|
||||
assert( p2<=(p->nMem+1 - p->nCursor) );
|
||||
assert( p2<=(u32)(p->nMem+1 - p->nCursor) );
|
||||
assert( pOp->opcode==OP_OpenWrite );
|
||||
pIn2 = &aMem[p2];
|
||||
assert( memIsValid(pIn2) );
|
||||
@ -6245,7 +6245,7 @@ case OP_IntegrityCk: {
|
||||
nRoot = pOp->p2;
|
||||
aRoot = pOp->p4.ai;
|
||||
assert( nRoot>0 );
|
||||
assert( aRoot[0]==nRoot );
|
||||
assert( aRoot[0]==(Pgno)nRoot );
|
||||
assert( pOp->p3>0 && pOp->p3<=(p->nMem+1 - p->nCursor) );
|
||||
pnErr = &aMem[pOp->p3];
|
||||
assert( (pnErr->flags & MEM_Int)!=0 );
|
||||
|
Reference in New Issue
Block a user