From 1be61ad2781211269c3e6315e49ee0529d981aac Mon Sep 17 00:00:00 2001 From: drh <> Date: Mon, 19 Jun 2023 13:09:16 +0000 Subject: [PATCH] Fix large integer constants so that they work on older C compilers. FossilOrigin-Name: 3c94f87806a8b408d8204fc7deec16d01c085ee199ff21a1f20b6346ce816cfe --- ext/misc/series.c | 6 +++++- manifest | 14 +++++++------- manifest.uuid | 2 +- src/date.c | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) 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