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
commit d4ca001544
5 changed files with 13 additions and 6 deletions

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
Utility:

View File

@ -4,7 +4,7 @@
# Written in 2023 by Alfonso Sabato Siciliano
OUTPUT = bsddialog
export VERSION=1.0.3
export VERSION=1.0.4
.CURDIR ?= ${CURDIR}
LIBPATH = ${.CURDIR}/lib
LIBBSDDIALOG = ${LIBPATH}/libbsddialog.so

View File

@ -1,4 +1,4 @@
# BSDDialog 1.0.3
# BSDDialog 1.0.4
This project provides **bsddialog** and **libbsddialog**, an utility
and a library to build scripts and tools with TUI dialogs and widgets.

View File

@ -30,7 +30,7 @@
#include <stdbool.h>
#define LIBBSDDIALOG_VERSION "1.0.3"
#define LIBBSDDIALOG_VERSION "1.0.4"
/* Return values */
#define BSDDIALOG_ERROR -1

View File

@ -85,7 +85,7 @@ enum OPTS {
LEFT3_BUTTON,
LEFT3_EXIT_CODE,
LOAD_THEME,
MAX_INPUT,
MAX_INPUT_FORM,
NO_CANCEL,
NO_DESCRIPTIONS,
NO_LINES,
@ -202,7 +202,7 @@ static struct option longopts[] = {
{"left3-button", required_argument, NULL, LEFT3_BUTTON},
{"left3-exit-code", required_argument, NULL, LEFT3_EXIT_CODE},
{"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},
{"nocancel", no_argument, NULL, NO_CANCEL},
{"no-descriptions", no_argument, NULL, NO_DESCRIPTIONS},
@ -546,7 +546,7 @@ parseargs(int argc, char **argv, struct bsddialog_conf *conf,
case LOAD_THEME:
opt->loadthemefile = optarg;
break;
case MAX_INPUT:
case MAX_INPUT_FORM:
opt->max_input_form = (u_int)strtoul(optarg, NULL, 10);
break;
case NO_CANCEL: