From 3f739b0595b7d6ac4bac9aaa1cae0910f11f92e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20E=C3=9Fer?= Date: Wed, 15 Jun 2022 11:34:25 +0200 Subject: [PATCH] vendor/bc: import version 5.3.3 This version fixes a build issue caused by the strict compiler warnings used when building FreeBSD base system components. --- NEWS.md | 7 +++++++ include/version.h | 2 +- src/history.c | 6 ++---- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/NEWS.md b/NEWS.md index eda77b17c21..543507c717d 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,12 @@ # News +## 5.3.3 + +This is a production release that fixes a build problem in the FreeBSD base +system. + +All other users do **NOT** need to upgrade. + ## 5.3.2 This is a production release that fixes prompt bugs with editline and readline diff --git a/include/version.h b/include/version.h index 63578e0fe8f..4400e4f59cc 100644 --- a/include/version.h +++ b/include/version.h @@ -37,6 +37,6 @@ #define BC_VERSION_H /// The current version. -#define VERSION 5.3.2 +#define VERSION 5.3.3 #endif // BC_VERSION_H diff --git a/src/history.c b/src/history.c index 47ed6cda7f2..3433c0ed8dd 100644 --- a/src/history.c +++ b/src/history.c @@ -157,13 +157,14 @@ sigjmp_buf bc_history_jmpbuf; volatile sig_atomic_t bc_history_inlinelib; static char* bc_history_prompt; +static char bc_history_no_prompt[] = ""; static HistEvent bc_history_event; static char* bc_history_promptFunc(EditLine* el) { BC_UNUSED(el); - return bc_history_prompt; + return BC_PROMPT ? bc_history_prompt : bc_history_no_prompt; } void @@ -172,9 +173,6 @@ bc_history_init(BcHistory* h) BcVec v; char* home; - // Just set a blank prompt when it is turned off. - if (!BC_PROMPT) bc_history_prompt = ""; - home = getenv("HOME"); // This will hold the true path to the editrc.