mirror of
https://github.com/freebsd/freebsd-src
synced 2024-09-06 17:18:32 +00:00
vendor/bc: import of version 5.2.5
This is a production release that fixes this bc's behavior on ^D to
match GNU bc.
(cherry picked from commit ed06037041
)
This commit is contained in:
parent
10f44229dc
commit
f4ff1c300e
|
@ -1,5 +1,10 @@
|
||||||
# News
|
# News
|
||||||
|
|
||||||
|
## 5.2.5
|
||||||
|
|
||||||
|
This is a production release that fixes this `bc`'s behavior on `^D` to match
|
||||||
|
GNU `bc`.
|
||||||
|
|
||||||
## 5.2.4
|
## 5.2.4
|
||||||
|
|
||||||
This is a production release that fixes two bugs in history:
|
This is a production release that fixes two bugs in history:
|
||||||
|
|
|
@ -37,6 +37,6 @@
|
||||||
#define BC_VERSION_H
|
#define BC_VERSION_H
|
||||||
|
|
||||||
/// The current version.
|
/// The current version.
|
||||||
#define VERSION 5.2.4
|
#define VERSION 5.2.5
|
||||||
|
|
||||||
#endif // BC_VERSION_H
|
#endif // BC_VERSION_H
|
||||||
|
|
|
@ -35,6 +35,7 @@
|
||||||
# * git
|
# * git
|
||||||
# * stat
|
# * stat
|
||||||
# * tar
|
# * tar
|
||||||
|
# * gzip
|
||||||
# * xz
|
# * xz
|
||||||
# * sha512sum
|
# * sha512sum
|
||||||
# * sha256sum
|
# * sha256sum
|
||||||
|
@ -182,6 +183,14 @@ cd ..
|
||||||
parent="$repo/.."
|
parent="$repo/.."
|
||||||
|
|
||||||
# Cleanup old stuff.
|
# Cleanup old stuff.
|
||||||
|
if [ -f "$projver.tar.gz" ]; then
|
||||||
|
rm -rf "$projver.tar.gz"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "$projver.tar.gz.sig" ]; then
|
||||||
|
rm -rf "$projver.tar.gz.sig"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f "$projver.tar.xz" ]; then
|
if [ -f "$projver.tar.xz" ]; then
|
||||||
rm -rf "$projver.tar.xz"
|
rm -rf "$projver.tar.xz"
|
||||||
fi
|
fi
|
||||||
|
@ -192,6 +201,8 @@ fi
|
||||||
|
|
||||||
# Tar and compress and move into the parent directory of the repo.
|
# Tar and compress and move into the parent directory of the repo.
|
||||||
tar cf "$projver.tar" "$projver/"
|
tar cf "$projver.tar" "$projver/"
|
||||||
|
gzip -k "$projver.tar"
|
||||||
|
mv "$projver.tar.gz" "$parent"
|
||||||
xz -z -v -9 -e "$projver.tar" > /dev/null 2> /dev/null
|
xz -z -v -9 -e "$projver.tar" > /dev/null 2> /dev/null
|
||||||
mv "$projver.tar.xz" "$parent"
|
mv "$projver.tar.xz" "$parent"
|
||||||
|
|
||||||
|
@ -242,6 +253,8 @@ rm -rf windows/lib/{Win32,x64}/{Debug,ReleaseMD,ReleaseMT}/bcl.vcxproj.FileListA
|
||||||
# Zip the Windows stuff.
|
# Zip the Windows stuff.
|
||||||
zip -r $projver-windows.zip windows > /dev/null
|
zip -r $projver-windows.zip windows > /dev/null
|
||||||
|
|
||||||
|
printf '\n'
|
||||||
|
shasum "$projver.tar.gz"
|
||||||
printf '\n'
|
printf '\n'
|
||||||
shasum "$projver.tar.xz"
|
shasum "$projver.tar.xz"
|
||||||
printf '\n'
|
printf '\n'
|
||||||
|
|
|
@ -601,6 +601,7 @@ clang_flags="-Weverything -Wno-padded -Wno-switch-enum -Wno-format-nonliteral"
|
||||||
clang_flags="$clang_flags -Wno-cast-align -Wno-missing-noreturn -Wno-disabled-macro-expansion"
|
clang_flags="$clang_flags -Wno-cast-align -Wno-missing-noreturn -Wno-disabled-macro-expansion"
|
||||||
clang_flags="$clang_flags -Wno-unreachable-code -Wno-unreachable-code-return"
|
clang_flags="$clang_flags -Wno-unreachable-code -Wno-unreachable-code-return"
|
||||||
clang_flags="$clang_flags -Wno-implicit-fallthrough -Wno-unused-macros -Wno-gnu-label-as-value"
|
clang_flags="$clang_flags -Wno-implicit-fallthrough -Wno-unused-macros -Wno-gnu-label-as-value"
|
||||||
|
clang_flags="$clang_flags -Wno-declaration-after-statement"
|
||||||
# -Wno-undef is here because Clang seems to think BC_C11 is undefined, when it's defined.
|
# -Wno-undef is here because Clang seems to think BC_C11 is undefined, when it's defined.
|
||||||
clang_flags="$clang_flags -Wno-undef"
|
clang_flags="$clang_flags -Wno-undef"
|
||||||
gcc_flags="-Wno-maybe-uninitialized -Wno-clobbered"
|
gcc_flags="-Wno-maybe-uninitialized -Wno-clobbered"
|
||||||
|
|
|
@ -1535,12 +1535,20 @@ static BcStatus bc_history_edit(BcHistory *h, const char *prompt) {
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
// Act as end-of-file.
|
// Act as end-of-file or delete-forward-char.
|
||||||
case BC_ACTION_CTRL_D:
|
case BC_ACTION_CTRL_D:
|
||||||
{
|
{
|
||||||
bc_history_printCtrl(h, c);
|
// Act as EOF if there's no chacters, otherwise emulate Emacs
|
||||||
BC_SIG_UNLOCK;
|
// delete next character to match historical gnu bc behavior.
|
||||||
return BC_STATUS_EOF;
|
if (BC_HIST_BUF_LEN(h) == 0) {
|
||||||
|
bc_history_printCtrl(h, c);
|
||||||
|
BC_SIG_UNLOCK;
|
||||||
|
return BC_STATUS_EOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
bc_history_edit_delete(h);
|
||||||
|
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
#endif // _WIN32
|
#endif // _WIN32
|
||||||
|
|
||||||
|
|
|
@ -282,8 +282,11 @@ def test_eof(exe, args, env):
|
||||||
child = pexpect.spawn(exe, args=args, env=env)
|
child = pexpect.spawn(exe, args=args, env=env)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
send(child, "\t")
|
send(child, "123")
|
||||||
expect(child, " ")
|
expect(child, "123")
|
||||||
|
send(child, "\x01")
|
||||||
|
send(child, "\x04")
|
||||||
|
send(child, "\x04")
|
||||||
send(child, "\x04")
|
send(child, "\x04")
|
||||||
wait(child)
|
wait(child)
|
||||||
except pexpect.TIMEOUT:
|
except pexpect.TIMEOUT:
|
||||||
|
|
Loading…
Reference in a new issue