mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-28 05:29:48 +00:00
- Fix build on -current (varargs -> stdarg)
PR: 56146 Submitted by: Michael Edenfield <kutulu@kutulu.org>
This commit is contained in:
parent
d7af773d26
commit
d947a3194c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=88065
14
shells/bash1/files/patch-af
Normal file
14
shells/bash1/files/patch-af
Normal file
@ -0,0 +1,14 @@
|
||||
--- support/mksysdefs.orig Fri Aug 29 11:26:47 2003
|
||||
+++ support/mksysdefs Fri Aug 29 11:27:59 2003
|
||||
@@ -415,7 +415,10 @@
|
||||
echo "#endif /* HAVE_STRING_H */" >>$sysdefs
|
||||
fi
|
||||
|
||||
-file=varargs.h
|
||||
+# varargs.h and it's var args support is deprecated in GCC 3.3,
|
||||
+# and has been obsolete for a while. Assume VARARGS means
|
||||
+# STDARG elsewhere in the code.
|
||||
+file=stdarg.h
|
||||
eval $findf
|
||||
if [ -n "$found" ]; then
|
||||
echo "" >>$sysdefs
|
41
shells/bash1/files/patch-am
Normal file
41
shells/bash1/files/patch-am
Normal file
@ -0,0 +1,41 @@
|
||||
--- print_cmd.c.orig Fri Aug 29 12:06:43 2003
|
||||
+++ print_cmd.c Fri Aug 29 12:07:51 2003
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined (HAVE_VARARGS_H)
|
||||
-# include <varargs.h>
|
||||
+# include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#if defined (HAVE_STRING_H)
|
||||
@@ -41,7 +41,8 @@
|
||||
static int indentation = 0;
|
||||
static int indentation_amount = 4;
|
||||
|
||||
-static void cprintf (), newline (), indent (), the_printed_command_resize ();
|
||||
+static void cprintf (char *, ...);
|
||||
+static void newline (), indent (), the_printed_command_resize ();
|
||||
static void semicolon ();
|
||||
|
||||
static void make_command_string_internal ();
|
||||
@@ -730,16 +731,14 @@
|
||||
|
||||
/* How to make the string. */
|
||||
static void
|
||||
-cprintf (va_alist)
|
||||
- va_dcl
|
||||
+cprintf (char *control, ...)
|
||||
{
|
||||
register char *s;
|
||||
- char *control, char_arg[2], *argp;
|
||||
+ char char_arg[2], *argp;
|
||||
int digit_arg, arg_len, c;
|
||||
va_list args;
|
||||
|
||||
- va_start (args);
|
||||
- control = va_arg (args, char *);
|
||||
+ va_start (args, control);
|
||||
|
||||
arg_len = strlen (control);
|
||||
the_printed_command_resize (arg_len + 1);
|
102
shells/bash1/files/patch-an
Normal file
102
shells/bash1/files/patch-an
Normal file
@ -0,0 +1,102 @@
|
||||
--- error.c.orig Fri Aug 29 12:21:42 2003
|
||||
+++ error.c Fri Aug 29 12:24:18 2003
|
||||
@@ -22,7 +22,7 @@
|
||||
#include <fcntl.h>
|
||||
|
||||
#if defined (HAVE_VFPRINTF)
|
||||
-#include <varargs.h>
|
||||
+#include <stdarg.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
@@ -121,18 +121,15 @@
|
||||
#else /* We have VARARGS support, so use it. */
|
||||
|
||||
void
|
||||
-programming_error (va_alist)
|
||||
- va_dcl
|
||||
+programming_error (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char *format;
|
||||
|
||||
#if defined (JOB_CONTROL)
|
||||
give_terminal_to (shell_pgrp);
|
||||
#endif /* JOB_CONTROL */
|
||||
|
||||
- va_start (args);
|
||||
- format = va_arg (args, char *);
|
||||
+ va_start (args, format);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
va_end (args);
|
||||
@@ -144,15 +141,12 @@
|
||||
}
|
||||
|
||||
void
|
||||
-report_error (va_alist)
|
||||
- va_dcl
|
||||
+report_error (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char *format;
|
||||
|
||||
fprintf (stderr, "%s: ", get_name_for_error ());
|
||||
- va_start (args);
|
||||
- format = va_arg (args, char *);
|
||||
+ va_start (args, format);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
@@ -162,15 +156,12 @@
|
||||
}
|
||||
|
||||
void
|
||||
-fatal_error (va_alist)
|
||||
- va_dcl
|
||||
+fatal_error (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char *format;
|
||||
|
||||
fprintf (stderr, "%s: ", get_name_for_error ());
|
||||
- va_start (args);
|
||||
- format = va_arg (args, char *);
|
||||
+ va_start (args, format);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
|
||||
@@ -179,14 +170,12 @@
|
||||
}
|
||||
|
||||
void
|
||||
-internal_error (va_alist)
|
||||
- va_dcl
|
||||
+internal_error (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char *format;
|
||||
|
||||
fprintf (stderr, "%s: ", get_name_for_error ());
|
||||
- va_start (args);
|
||||
+ va_start (args, format);
|
||||
format = va_arg (args, char *);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
||||
@@ -194,14 +183,12 @@
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
-itrace (va_alist)
|
||||
- va_dcl
|
||||
+itrace (char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
- char *format;
|
||||
|
||||
fprintf(stderr, "TRACE: pid %d: ", getpid());
|
||||
- va_start (args);
|
||||
+ va_start (args, format);
|
||||
format = va_arg (args, char *);
|
||||
vfprintf (stderr, format, args);
|
||||
fprintf (stderr, "\n");
|
16
shells/bash1/files/patch-ao
Normal file
16
shells/bash1/files/patch-ao
Normal file
@ -0,0 +1,16 @@
|
||||
--- error.h.orig Fri Aug 29 12:24:24 2003
|
||||
+++ error.h Fri Aug 29 12:25:40 2003
|
||||
@@ -25,10 +25,10 @@
|
||||
extern void file_error ();
|
||||
|
||||
/* Report a programmer's error, and abort. Pass REASON, and ARG1 ... ARG5. */
|
||||
-extern void programming_error ();
|
||||
+extern void programming_error (char *, ...);
|
||||
|
||||
/* General error reporting. Pass FORMAT and ARG1 ... ARG5. */
|
||||
-extern void report_error ();
|
||||
+extern void report_error (char *, ...);
|
||||
|
||||
/* Report an unrecoverable error and exit. Pass FORMAT and ARG1 ... ARG5. */
|
||||
-extern void fatal_error ();
|
||||
+extern void fatal_error (char *, ...);
|
30
shells/bash1/files/patch-ap
Normal file
30
shells/bash1/files/patch-ap
Normal file
@ -0,0 +1,30 @@
|
||||
--- builtins/common.c.orig Fri Aug 29 12:14:26 2003
|
||||
+++ builtins/common.c Fri Aug 29 12:18:31 2003
|
||||
@@ -20,7 +20,7 @@
|
||||
#include <sys/types.h>
|
||||
#include "../posixstat.h"
|
||||
#if defined (HAVE_VFPRINTF)
|
||||
-#include <varargs.h>
|
||||
+#include <stdarg.h>
|
||||
#endif /* VFPRINTF */
|
||||
|
||||
#if defined (HAVE_STRING_H)
|
||||
@@ -114,16 +114,14 @@
|
||||
shell. */
|
||||
#if defined (HAVE_VFPRINTF)
|
||||
void
|
||||
-builtin_error (va_alist)
|
||||
- va_dcl
|
||||
+builtin_error (char *format, ...)
|
||||
{
|
||||
- char *format;
|
||||
va_list args;
|
||||
|
||||
if (this_command_name && *this_command_name)
|
||||
fprintf (stderr, "%s: ", this_command_name);
|
||||
|
||||
- va_start (args);
|
||||
+ va_start (args, format);
|
||||
format = va_arg (args, char *);
|
||||
vfprintf (stderr, format, args);
|
||||
va_end (args);
|
11
shells/bash1/files/patch-aq
Normal file
11
shells/bash1/files/patch-aq
Normal file
@ -0,0 +1,11 @@
|
||||
--- builtins/common.h.orig Fri Aug 29 12:14:20 2003
|
||||
+++ builtins/common.h Fri Aug 29 12:14:46 2003
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
#define ISOPTION(s, c) (s[0] == '-' && !s[2] && s[1] == c)
|
||||
|
||||
-extern void builtin_error ();
|
||||
+extern void builtin_error (char *, ...);
|
||||
extern void bad_option ();
|
||||
|
||||
extern int get_numeric_arg ();
|
18
shells/bash1/files/patch-ar
Normal file
18
shells/bash1/files/patch-ar
Normal file
@ -0,0 +1,18 @@
|
||||
--- lib/readline/display.c.orig Fri Aug 29 12:28:33 2003
|
||||
+++ lib/readline/display.c Fri Aug 29 12:29:29 2003
|
||||
@@ -1020,13 +1020,11 @@
|
||||
mini-modeline. */
|
||||
|
||||
#if defined (HAVE_VARARGS_H)
|
||||
-rl_message (va_alist)
|
||||
- va_dcl
|
||||
+rl_message (char *format, ...)
|
||||
{
|
||||
- char *format;
|
||||
va_list args;
|
||||
|
||||
- va_start (args);
|
||||
+ va_start (args, format);
|
||||
format = va_arg (args, char *);
|
||||
vsprintf (msg_buf, format, args);
|
||||
va_end (args);
|
11
shells/bash1/files/patch-as
Normal file
11
shells/bash1/files/patch-as
Normal file
@ -0,0 +1,11 @@
|
||||
--- lib/readline/rldefs.h.orig Fri Aug 29 12:30:13 2003
|
||||
+++ lib/readline/rldefs.h Fri Aug 29 12:30:32 2003
|
||||
@@ -150,7 +150,7 @@
|
||||
#endif /* !strchr && !__STDC__ */
|
||||
|
||||
#if defined (HAVE_VARARGS_H)
|
||||
-# include <varargs.h>
|
||||
+# include <stdarg.h>
|
||||
#endif /* HAVE_VARARGS_H */
|
||||
|
||||
/* This is needed to include support for TIOCGWINSZ and window resizing. */
|
12
shells/bash1/files/patch-at
Normal file
12
shells/bash1/files/patch-at
Normal file
@ -0,0 +1,12 @@
|
||||
--- lib/readline/readline.h.orig Fri Aug 29 12:33:32 2003
|
||||
+++ lib/readline/readline.h Fri Aug 29 12:31:34 2003
|
||||
@@ -271,7 +271,8 @@
|
||||
|
||||
/* Functions in display.c */
|
||||
extern void rl_redisplay ();
|
||||
-extern int rl_message (), rl_clear_message ();
|
||||
+extern int rl_message (char *, ...);
|
||||
+extern int rl_clear_message ();
|
||||
extern int rl_reset_line_state ();
|
||||
extern int rl_character_len ();
|
||||
extern int rl_show_char ();
|
Loading…
Reference in New Issue
Block a user