vendor/bc: import version 6.0.4

This version fixes a bug in the BC library that only affected
OpenBSD.
This commit is contained in:
Stefan Eßer 2023-01-28 20:54:39 +01:00
parent 161a37cc71
commit 9471e6a095
5 changed files with 31 additions and 3 deletions

View File

@ -211,8 +211,8 @@ CPPFLAGS6 = $(CPPFLAGS5) -DBC_ENABLE_NLS=$(BC_ENABLE_NLS)
CPPFLAGS7 = $(CPPFLAGS6) -D$(BC_ENABLE_EXTRA_MATH_NAME)=$(BC_ENABLE_EXTRA_MATH)
CPPFLAGS8 = $(CPPFLAGS7) -DBC_ENABLE_HISTORY=$(BC_ENABLE_HISTORY) -DBC_ENABLE_LIBRARY=$(BC_ENABLE_LIBRARY)
CPPFLAGS = $(CPPFLAGS8) -DBC_ENABLE_MEMCHECK=$(BC_ENABLE_MEMCHECK) -DBC_ENABLE_AFL=$(BC_ENABLE_AFL)
CFLAGS = $(CPPFLAGS) $(BC_DEFS) $(DC_DEFS) %%CPPFLAGS%% %%CFLAGS%% -I$(INCLUDEDIR)
LDFLAGS = %%LDFLAGS%% -L$(LIBDIR)
CFLAGS = $(CPPFLAGS) $(BC_DEFS) $(DC_DEFS) %%CPPFLAGS%% %%CFLAGS%%
LDFLAGS = %%LDFLAGS%%
HOSTCFLAGS = %%HOSTCFLAGS%%

13
NEWS.md
View File

@ -1,5 +1,18 @@
# News
## 6.0.4
This is a production release that most users will not need to upgrade to.
This fixes a build bug for `bcl` only on OpenBSD. Users that do not need `bcl`
or have not run into build errors with `bcl` do ***NOT*** need to upgrade.
## 6.0.3
This is a production release that fixes a build bug for cross-compilation.
Users that do not need cross-compilation do ***NOT*** need to upgrade.
## 6.0.2
This is a production release that fixes two bugs:

View File

@ -36,6 +36,12 @@
#ifndef LIBBC_PRIVATE_H
#define LIBBC_PRIVATE_H
#ifndef _WIN32
#include <pthread.h>
#endif // _WIN32
#include <bcl.h>
#include <num.h>

View File

@ -37,6 +37,6 @@
#define BC_VERSION_H
/// The current version.
#define VERSION 6.0.2
#define VERSION 6.0.4
#endif // BC_VERSION_H

View File

@ -92,6 +92,15 @@ bc_parse_addNum(BcParse* p, const char* string)
BcConst* c;
BcVec* slabs;
// XXX: This function has an implicit assumption: that string is a valid C
// string with a nul terminator. This is because of the unchecked array
// accesses below. I can't check this with an assert() because that could
// lead to out-of-bounds access.
//
// XXX: In fact, just for safety's sake, assume that this function needs a
// non-empty string with a nul terminator, just in case bc_parse_zero or
// bc_parse_one change in the future, which I doubt.
BC_SIG_ASSERT_LOCKED;
// Special case 0.