Add function to subtract with overflow check
commitb15afff85c2eddec43025a1e7a63d7916c7d102e
authorOlly Betts <olly@survex.com>
Thu, 28 Apr 2022 06:21:27 +0000 (28 18:21 +1200)
committerOlly Betts <olly@survex.com>
Mon, 2 May 2022 21:38:11 +0000 (3 09:38 +1200)
tree207d2f77ab5a15a4490ef9bf746b2717a03a5e60
parentcd68a4dc667b80e77acb121b8fa3d66bf08e520b
Add function to subtract with overflow check

This is implemented with compiler builtins or equivalent where possible,
so the overflow check will typically just require a check of the
processor's overflow or carry flag.

(cherry picked from commit 54fe547542543fa983f9f31d496a7a6b2fdba545)
xapian-applications/omega/configure.ac
xapian-core/common/overflow.h
xapian-core/configure.ac
xapian-core/tests/unittest.cc