fix(bash-4.4.23-1): update mkbuiltins prototypes and definitions for C23

This commit is contained in:
vxtls 2026-03-03 19:21:23 -05:00
parent f11bbe6733
commit 1d9c9b973b

View file

@ -0,0 +1,87 @@
SPDX-License-Identifier: GPL-3.0-or-later
Fix mkbuiltins prototypes and definitions for C23-compatible compilers.
--- bash-4.4/builtins/mkbuiltins.c
+++ bash-4.4/builtins/mkbuiltins.c
@@ -191,12 +191,12 @@
void write_file_headers ();
void write_file_footers ();
void write_ifdefs ();
-void write_endifs ();
-void write_documentation ();
+void write_endifs (FILE *, char **);
+void write_documentation (FILE *, char **, int, int);
void write_longdocs ();
void write_builtins ();
-int write_helpfiles ();
+int write_helpfiles (ARRAY *);
void free_defs ();
void add_documentation ();
@@ -1018,8 +1018,7 @@
static void memory_error_and_abort ();
static char *
-xmalloc (bytes)
- int bytes;
+xmalloc (int bytes)
{
char *temp = (char *)malloc (bytes);
@@ -1029,9 +1028,7 @@
}
static char *
-xrealloc (pointer, bytes)
- char *pointer;
- int bytes;
+xrealloc (char *pointer, int bytes)
{
char *temp;
@@ -1375,9 +1372,7 @@
If a define is preceded by an `!', then the sense of the test is
reversed. */
void
-write_ifdefs (stream, defines)
- FILE *stream;
- char **defines;
+write_ifdefs (FILE *stream, char **defines)
{
register int i;
@@ -1406,9 +1401,7 @@
STREAM is the stream to write the information to.
DEFINES is a null terminated array of define names. */
void
-write_endifs (stream, defines)
- FILE *stream;
- char **defines;
+write_endifs (FILE *stream, char **defines)
{
register int i;
@@ -1433,10 +1426,7 @@
internationalization (gettext) and the single-string vs. multiple-strings
issues. */
void
-write_documentation (stream, documentation, indentation, flags)
- FILE *stream;
- char **documentation;
- int indentation, flags;
+write_documentation (FILE *stream, char **documentation, int indentation, int flags)
{
register int i, j;
register char *line;
@@ -1564,8 +1554,7 @@
}
int
-write_helpfiles (builtins)
- ARRAY *builtins;
+write_helpfiles (ARRAY *builtins)
{
char *helpfile, *bname;
FILE *helpfp;