Import bsddialog 1.0.4

This fixes a future conflict with _FORTIFY_SOURCE, where <stdlib.h> includes
<limits.h> and causes a conflict with `MAX_INPUT` defined in the enum here.

Sponsored by:	Klara, Inc.
Sponsored by:	Stormshield
This commit is contained in:
Kyle Evans
2024-07-11 01:17:23 -05:00
5 changed files with 13 additions and 6 deletions
+7
View File
@@ -1,3 +1,10 @@
2024-07-01 1.0.4
Utility internal refactoring (no functional change):
* change: rename an internal constant to avoid a future conflict
because FreeBSD is changing headers files for _FORTIFY_SOURCE.
Reported and fixed by Kyle Evans.
2024-05-27 1.0.3 2024-05-27 1.0.3
Utility: Utility:
+1 -1
View File
@@ -4,7 +4,7 @@
# Written in 2023 by Alfonso Sabato Siciliano # Written in 2023 by Alfonso Sabato Siciliano
OUTPUT = bsddialog OUTPUT = bsddialog
export VERSION=1.0.3 export VERSION=1.0.4
.CURDIR ?= ${CURDIR} .CURDIR ?= ${CURDIR}
LIBPATH = ${.CURDIR}/lib LIBPATH = ${.CURDIR}/lib
LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so
+1 -1
View File
@@ -1,4 +1,4 @@
# BSDDialog 1.0.3 # BSDDialog 1.0.4
This project provides **bsddialog** and **libbsddialog**, an utility This project provides **bsddialog** and **libbsddialog**, an utility
and a library to build scripts and tools with TUI dialogs and widgets. and a library to build scripts and tools with TUI dialogs and widgets.
+1 -1
View File
@@ -30,7 +30,7 @@
#include <stdbool.h> #include <stdbool.h>
#define LIBBSDDIALOG_VERSION "1.0.3" #define LIBBSDDIALOG_VERSION "1.0.4"
/* Return values */ /* Return values */
#define BSDDIALOG_ERROR -1 #define BSDDIALOG_ERROR -1
+3 -3
View File
@@ -85,7 +85,7 @@ enum OPTS {
LEFT3_BUTTON, LEFT3_BUTTON,
LEFT3_EXIT_CODE, LEFT3_EXIT_CODE,
LOAD_THEME, LOAD_THEME,
MAX_INPUT, MAX_INPUT_FORM,
NO_CANCEL, NO_CANCEL,
NO_DESCRIPTIONS, NO_DESCRIPTIONS,
NO_LINES, NO_LINES,
@@ -202,7 +202,7 @@ static struct option longopts[] = {
{"left3-button", required_argument, NULL, LEFT3_BUTTON}, {"left3-button", required_argument, NULL, LEFT3_BUTTON},
{"left3-exit-code", required_argument, NULL, LEFT3_EXIT_CODE}, {"left3-exit-code", required_argument, NULL, LEFT3_EXIT_CODE},
{"load-theme", required_argument, NULL, LOAD_THEME}, {"load-theme", required_argument, NULL, LOAD_THEME},
{"max-input", required_argument, NULL, MAX_INPUT}, {"max-input", required_argument, NULL, MAX_INPUT_FORM},
{"no-cancel", no_argument, NULL, NO_CANCEL}, {"no-cancel", no_argument, NULL, NO_CANCEL},
{"nocancel", no_argument, NULL, NO_CANCEL}, {"nocancel", no_argument, NULL, NO_CANCEL},
{"no-descriptions", no_argument, NULL, NO_DESCRIPTIONS}, {"no-descriptions", no_argument, NULL, NO_DESCRIPTIONS},
@@ -546,7 +546,7 @@ parseargs(int argc, char **argv, struct bsddialog_conf *conf,
case LOAD_THEME: case LOAD_THEME:
opt->loadthemefile = optarg; opt->loadthemefile = optarg;
break; break;
case MAX_INPUT: case MAX_INPUT_FORM:
opt->max_input_form = (u_int)strtoul(optarg, NULL, 10); opt->max_input_form = (u_int)strtoul(optarg, NULL, 10);
break; break;
case NO_CANCEL: case NO_CANCEL: