aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2014-02-26 08:54:20 -0800
committerDan Gohman <sunfish@mozilla.com>2014-02-27 16:30:50 -0800
commitf1a904c15bc08d61e8dc80c3def658e136ce125c (patch)
treea2c0aec3aebdd13adecf33ac381260a8a4da23ee
parent8acb7867b362073e4c0d402b632aebd0de8be9e3 (diff)
Remove Emscripten-specific workarounds from the sqlite3 test.
-rw-r--r--tests/sqlite/sqlite3.c18
1 files changed, 0 insertions, 18 deletions
diff --git a/tests/sqlite/sqlite3.c b/tests/sqlite/sqlite3.c
index d49e1887..2d7c7725 100644
--- a/tests/sqlite/sqlite3.c
+++ b/tests/sqlite/sqlite3.c
@@ -38132,9 +38132,6 @@ static int writeJournalHdr(Pager *pPager){
u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
u32 nWrite; /* Bytes of header sector written */
int ii; /* Loop counter */
-#ifdef __EMSCRIPTEN__
- u8 temp[4];
-#endif
assert( isOpen(pPager->jfd) ); /* Journal file must be open. */
@@ -38185,12 +38182,7 @@ static int writeJournalHdr(Pager *pPager){
}
/* The random check-hash initialiser */
-#ifdef __EMSCRIPTEN__
- sqlite3_randomness(sizeof(pPager->cksumInit), temp);
- pPager->cksumInit = temp[0] + (((u32)temp[1]) << 8) + (((u32)temp[2]) << 16) + (((u32)temp[3]) << 24);
-#else
sqlite3_randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
-#endif
put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);
/* The initial database size */
put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbOrigSize);
@@ -52942,12 +52934,7 @@ static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
endPtr = &data[pPage->cellOffset + 2*pPage->nCell - 2];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr<endPtr ){
-#ifdef __EMSCRIPTEN__
- ptr[0] = ptr[2];
- ptr[1] = ptr[3];
-#else
*(u16*)ptr = *(u16*)&ptr[2];
-#endif
ptr += 2;
}
pPage->nCell--;
@@ -53043,12 +53030,7 @@ static void insertCell(
endPtr = &data[ins];
assert( (SQLITE_PTR_TO_INT(ptr)&1)==0 ); /* ptr is always 2-byte aligned */
while( ptr>endPtr ){
-#ifdef __EMSCRIPTEN__
- ptr[0] = ptr[-2];
- ptr[1] = ptr[-1];
-#else
*(u16*)ptr = *(u16*)&ptr[-2];
-#endif
ptr -= 2;
}
put2byte(&data[ins], idx);