aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.in4
-rw-r--r--NEWS.md13
-rw-r--r--include/library.h6
-rw-r--r--include/version.h2
-rw-r--r--src/parse.c9
5 files changed, 31 insertions, 3 deletions
diff --git a/Makefile.in b/Makefile.in
index eb607dca0a1f..9f187cbc61ed 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -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%%
diff --git a/NEWS.md b/NEWS.md
index 5ba1020f85c4..33ed7b9c25e2 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -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:
diff --git a/include/library.h b/include/library.h
index 94c62923062a..2984de29d208 100644
--- a/include/library.h
+++ b/include/library.h
@@ -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>
diff --git a/include/version.h b/include/version.h
index 74b1dc72bd0c..4fbbe3c2acf4 100644
--- a/include/version.h
+++ b/include/version.h
@@ -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
diff --git a/src/parse.c b/src/parse.c
index 0cb379a45130..6ecc459bdfb0 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -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.