1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-18 02:19:39 +00:00

vendor/bc: upgrade to version 7.0.3

This version fixes build warnings on other systems than FreeBSD.
There are no functional changes relative to the previous version.
This commit is contained in:
Stefan Eßer 2024-09-24 23:22:37 +02:00
parent c2c85f8890
commit 5a7f1dde93
6 changed files with 22 additions and 7 deletions

View File

@ -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

View File

@ -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/

View File

@ -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

View File

@ -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.

View File

@ -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

View File

@ -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);