Upgrade bc to 5.0.1
(This lets us remove the macOS fortify workaround and the
BC_ENABLE_LIBRARY workaround that were part of the 5.0.0 upgrade. I've
also removed a couple of obsolete -D lines that were pointed out by the
upstream maintainer when he helped with the 5.0.0 upgrade; he got 5.0.1
out quicker than I could clean those up separately!)
Test: make
Change-Id: I02ee4e41d62e9430386c1690e5200f356e5c21f1
diff --git a/Android.bp b/Android.bp
index 0272c84..7d7afe2 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,10 +24,7 @@
"-DDC_ENABLED=0",
"-DBC_ENABLE_EXTRA_MATH=0",
"-DBC_ENABLE_HISTORY=0",
- "-DBC_ENABLE_LIBRARY=0",
- "-DBC_ENABLE_LONG_OPTIONS=1",
"-DBC_ENABLE_NLS=0",
- "-DBC_ENABLE_SIGNALS=1",
"-Os",
],
generated_headers: ["bc-version.h"],
@@ -39,12 +36,6 @@
":bc-lib.c",
],
stl: "none",
- target: {
- darwin: {
- // TODO: temporary workaround for https://github.com/gavinhoward/bc/issues/35
- cflags: ["-D_FORTIFY_SOURCE=0"],
- },
- },
}
genrule {
diff --git a/METADATA b/METADATA
index 080b866..8c23596 100644
--- a/METADATA
+++ b/METADATA
@@ -5,11 +5,11 @@
type: GIT
value: "https://github.com/gavinhoward/bc"
}
- version: "5.0.0"
+ version: "5.0.1"
license_type: NOTICE
last_upgrade_date {
year: 2021
month: 8
- day: 10
+ day: 13
}
}
diff --git a/NEWS.md b/NEWS.md
index 3b1477c..9068243 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,14 @@
# News
+## 5.0.1
+
+This is a production release with two fixes:
+
+* Fix for the build on Mac OSX.
+* Fix for the build on Android.
+
+Users that do not use those platforms do ***NOT*** need to update.
+
## 5.0.0
This is a major production release with several changes:
diff --git a/include/status.h b/include/status.h
index 781248a..662f2b8 100644
--- a/include/status.h
+++ b/include/status.h
@@ -53,6 +53,10 @@
#define DC_ENABLED (1)
#endif // DC_ENABLED
+#ifndef BC_ENABLE_LIBRARY
+#define BC_ENABLE_LIBRARY (0)
+#endif // BC_ENABLE_LIBRARY
+
// This is error checking for fuzz builds.
#if BC_ENABLE_AFL
#ifndef __AFL_HAVE_MANUAL_CONTROL
diff --git a/include/vector.h b/include/vector.h
index 8f7cbbc..c35d22c 100644
--- a/include/vector.h
+++ b/include/vector.h
@@ -441,7 +441,7 @@
* contain @a s.
* @param s The source string.
*/
-#define strcpy(d, l, s) strcpy(d, s)
+#define bc_strcpy(d, l, s) strcpy(d, s)
#else // _WIN32
@@ -452,7 +452,7 @@
* contain @a s.
* @param s The source string.
*/
-#define strcpy(d, l, s) strcpy_s(d, l, s)
+#define bc_strcpy(d, l, s) strcpy_s(d, l, s)
#endif // _WIN32
diff --git a/include/version.h b/include/version.h
index 5127c28..946dc67 100644
--- a/include/version.h
+++ b/include/version.h
@@ -37,6 +37,6 @@
#define BC_VERSION_H
/// The current version.
-#define VERSION 5.0.0
+#define VERSION 5.0.1
#endif // BC_VERSION_H
diff --git a/src/vector.c b/src/vector.c
index 1cd90f7..ebc2e76 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -461,7 +461,7 @@
ptr = (char*) (s->s + s->len);
- strcpy(ptr, len, str);
+ bc_strcpy(ptr, len, str);
s->len += len;