From: drh <> Date: Mon, 19 Jun 2023 13:09:16 +0000 (+0000) Subject: Fix large integer constants so that they work on older C compilers. X-Git-Tag: version-3.43.0~191 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1be61ad2781211269c3e6315e49ee0529d981aac;p=thirdparty%2Fsqlite.git Fix large integer constants so that they work on older C compilers. FossilOrigin-Name: 3c94f87806a8b408d8204fc7deec16d01c085ee199ff21a1f20b6346ce816cfe --- diff --git a/ext/misc/series.c b/ext/misc/series.c index 0deabf95a6..3bd567b2ef 100644 --- a/ext/misc/series.c +++ b/ext/misc/series.c @@ -330,6 +330,10 @@ static int seriesColumn( return SQLITE_OK; } +#ifndef LARGEST_UINT64 +#define LARGEST_UINT64 (0xffffffff|(((sqlite3_uint64)0xffffffff)<<32)) +#endif + /* ** Return the rowid for the current row, logically equivalent to n+1 where ** "n" is the ascending integer in the aforesaid production definition. @@ -337,7 +341,7 @@ static int seriesColumn( static int seriesRowid(sqlite3_vtab_cursor *cur, sqlite_int64 *pRowid){ series_cursor *pCur = (series_cursor*)cur; sqlite3_uint64 n = pCur->ss.uSeqIndexNow; - *pRowid = (sqlite3_int64)((n<0xffffffffffffffff)? n+1 : 0); + *pRowid = (sqlite3_int64)((n