aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Eßer <se@FreeBSD.org>2024-09-24 21:22:37 +0000
committerStefan Eßer <se@FreeBSD.org>2024-09-24 21:22:37 +0000
commit5a7f1dde93a4c681a5a4246ddabc562a7f7ce14d (patch)
treef00e5fa0e88e0f38c966fad63d6d815f01b9804e
parentc2c85f88902d18d2e9702381f1628112e15a5c3c (diff)
downloadsrc-vendor/bc.tar.gz
src-vendor/bc.zip
vendor/bc: upgrade to version 7.0.3vendor/bc/7.0.3vendor/bc
This version fixes build warnings on other systems than FreeBSD. There are no functional changes relative to the previous version.
-rw-r--r--NEWS.md6
-rw-r--r--README.md3
-rw-r--r--include/version.h2
-rw-r--r--src/file.c3
-rw-r--r--src/program.c12
-rw-r--r--src/vm.c3
6 files changed, 22 insertions, 7 deletions
diff --git a/NEWS.md b/NEWS.md
index e3b1f9ecb7bc..dc2425a532ac 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -1,5 +1,11 @@
# News
+## 7.0.3
+
+This is a production release that fixes build warnings on the musl libc.
+
+Other users do ***NOT*** need to upgrade.
+
## 7.0.2
This is a production release that fixes `Ctrl+d` on FreeBSD and Linux when using
diff --git a/README.md b/README.md
index 696e6186b8bd..3b17577945ff 100644
--- a/README.md
+++ b/README.md
@@ -432,6 +432,8 @@ Other projects based on this bc are:
* [macOS `bc`][35]. Any bugs in that `bc` should be reported to me, but do
expect bugs because the version is old.
* [Android Open Source `bc`][32]. Any bugs in that `bc` can be reported here.
+* [A Fedora package][36]. If this package does not have any patches, you can
+ report bugs to me.
This is a non-comprehensive list of Linux distros that use this `bc` as the
system `bc`:
@@ -516,3 +518,4 @@ Folders:
[33]: https://github.com/gentoo/gentoo/blob/master/app-alternatives/bc/bc-0.ebuild#L8
[34]: https://www.linuxfromscratch.org/lfs/view/stable/chapter08/bc.html
[35]: https://github.com/apple-oss-distributions/bc/tree/main/bc
+[36]: https://copr.fedorainfracloud.org/coprs/tkbcopr/bc-gh/
diff --git a/include/version.h b/include/version.h
index a4fb8def5024..e5c9ea3290e1 100644
--- a/include/version.h
+++ b/include/version.h
@@ -37,6 +37,6 @@
#define BC_VERSION_H
/// The current version.
-#define VERSION 7.0.2
+#define VERSION 7.0.3
#endif // BC_VERSION_H
diff --git a/src/file.c b/src/file.c
index 9baea585603b..697fca8cf29d 100644
--- a/src/file.c
+++ b/src/file.c
@@ -291,11 +291,12 @@ bc_file_vprintf(BcFile* restrict f, const char* fmt, va_list args)
// This mess is to silence a warning.
#if BC_CLANG
+#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wformat-nonliteral"
#endif // BC_CLANG
r = vfprintf(f->f, fmt, args);
#if BC_CLANG
-#pragma clang diagnostic warning "-Wformat-nonliteral"
+#pragma clang diagnostic pop
#endif // BC_CLANG
// Just print and propagate the error.
diff --git a/src/program.c b/src/program.c
index 3b6ebc003a3e..469835d321b9 100644
--- a/src/program.c
+++ b/src/program.c
@@ -3039,10 +3039,12 @@ bc_program_exec(BcProgram* p)
#if BC_HAS_COMPUTED_GOTO
#if BC_GCC
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif // BC_GCC
#if BC_CLANG
+#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-label-as-value"
#endif // BC_CLANG
@@ -3050,11 +3052,11 @@ bc_program_exec(BcProgram* p)
BC_PROG_LBLS_ASSERT;
#if BC_CLANG
-#pragma clang diagnostic warning "-Wgnu-label-as-value"
+#pragma clang diagnostic pop
#endif // BC_CLANG
#if BC_GCC
-#pragma GCC diagnostic warning "-Wpedantic"
+#pragma GCC diagnostic pop
#endif // BC_GCC
// BC_INST_INVALID is a marker for the end so that we don't have to have an
@@ -3085,10 +3087,12 @@ bc_program_exec(BcProgram* p)
#if BC_HAS_COMPUTED_GOTO
#if BC_GCC
+#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wpedantic"
#endif // BC_GCC
#if BC_CLANG
+#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wgnu-label-as-value"
#endif // BC_CLANG
@@ -3711,11 +3715,11 @@ bc_program_exec(BcProgram* p)
#if BC_HAS_COMPUTED_GOTO
#if BC_CLANG
-#pragma clang diagnostic warning "-Wgnu-label-as-value"
+#pragma clang diagnostic pop
#endif // BC_CLANG
#if BC_GCC
-#pragma GCC diagnostic warning "-Wpedantic"
+#pragma GCC diagnostic pop
#endif // BC_GCC
#else // BC_HAS_COMPUTED_GOTO
diff --git a/src/vm.c b/src/vm.c
index 636cd4ba0c1b..b97fa37623ad 100644
--- a/src/vm.c
+++ b/src/vm.c
@@ -222,11 +222,12 @@ bc_vm_sigaction(void)
// This mess is to silence a warning on Clang with regards to glibc's
// sigaction handler, which activates the warning here.
#if BC_CLANG
+#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdisabled-macro-expansion"
#endif // BC_CLANG
sa.sa_handler = bc_vm_sig;
#if BC_CLANG
-#pragma clang diagnostic warning "-Wdisabled-macro-expansion"
+#pragma clang diagnostic pop
#endif // BC_CLANG
sigaction(SIGTERM, &sa, NULL);