aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2021-08-13 13:37:05 -0700
committerElliott Hughes <enh@google.com>2021-08-13 14:45:49 -0700
commitf7c095ad17455142a49399a6d490d6ac18c206e8 (patch)
tree72a8750b9f79e4a600c21a3af5125e194e6eabef
parenta79df4f165b3b1564f9c404224eda5ce9d0df992 (diff)
parent5e98c6229be8333de539697b38efa716fd42f7ee (diff)
downloadplatform_external_bc-master.tar.gz
platform_external_bc-master.tar.bz2
platform_external_bc-master.zip
(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
-rw-r--r--Android.bp9
-rw-r--r--METADATA4
-rw-r--r--NEWS.md9
-rw-r--r--include/status.h4
-rw-r--r--include/vector.h4
-rw-r--r--include/version.h2
-rw-r--r--src/vector.c2
7 files changed, 19 insertions, 15 deletions
diff --git a/Android.bp b/Android.bp
index 0272c848..7d7afe24 100644
--- a/Android.bp
+++ b/Android.bp
@@ -24,10 +24,7 @@ cc_defaults {
"-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 @@ cc_defaults {
":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 080b8664..8c235963 100644
--- a/METADATA
+++ b/METADATA
@@ -5,11 +5,11 @@ third_party {
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 3b1477ca..90682435 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 781248ad..662f2b89 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 8f7cbbcc..c35d22c9 100644
--- a/include/vector.h
+++ b/include/vector.h
@@ -441,7 +441,7 @@ void bc_slabvec_print(BcVec *v, const char *func);
* 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 @@ void bc_slabvec_print(BcVec *v, const char *func);
* 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 5127c28e..946dc67b 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 1cd90f72..ebc2e76c 100644
--- a/src/vector.c
+++ b/src/vector.c
@@ -461,7 +461,7 @@ static char* bc_slab_add(BcSlab *s, const char *str, size_t len) {
ptr = (char*) (s->s + s->len);
- strcpy(ptr, len, str);
+ bc_strcpy(ptr, len, str);
s->len += len;