summaryrefslogtreecommitdiff
path: root/mbone/imm/patches
diff options
context:
space:
mode:
authorrtr <rtr@pkgsrc.org>2003-10-08 10:40:37 +0000
committerrtr <rtr@pkgsrc.org>2003-10-08 10:40:37 +0000
commit75a6f41efbb7431438270c76680471771763c9a7 (patch)
tree04a75f7c95ea64b2e59cb381226e6cf7d3dd0cba /mbone/imm/patches
parentec4c7f7c8428ad7a970c29fd4f27d7e79b54ea2e (diff)
downloadpkgsrc-75a6f41efbb7431438270c76680471771763c9a7.tar.gz
patch-aa: Convert to use stdarg instead of varargs for gcc3
Should resolve pr pkg/23091. Patch approved by Johnny C. Lam.
Diffstat (limited to 'mbone/imm/patches')
-rw-r--r--mbone/imm/patches/patch-aa87
1 files changed, 87 insertions, 0 deletions
diff --git a/mbone/imm/patches/patch-aa b/mbone/imm/patches/patch-aa
new file mode 100644
index 00000000000..4018261904b
--- /dev/null
+++ b/mbone/imm/patches/patch-aa
@@ -0,0 +1,87 @@
+--- utils.c.orig 2003-10-08 16:18:08.000000000 +1000
++++ utils.c 2003-10-08 16:18:18.000000000 +1000
+@@ -20,7 +20,7 @@
+ * These notices must be retained in any copies of any part of this software.
+ ******************************************************************************/
+ #include <stdio.h>
+-#include <varargs.h>
++#include <stdarg.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #ifdef __NetBSD__
+@@ -40,14 +40,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void warn( va_alist )
+-va_dcl
++void
++warn(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+
+- va_start( args );
+- fmt = va_arg( args, char * );
++ va_start(args, fmt);
+ fprintf( stderr, "Warning: " );
+ vfprintf( stderr, fmt, args );
+ va_end( args );
+@@ -55,14 +53,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void die( va_alist )
+-va_dcl
++void
++die(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+
+- va_start( args );
+- fmt = va_arg( args, char * );
++ va_start(args, fmt);
+ fprintf( stderr, "Error: " );
+ vfprintf( stderr, fmt, args );
+ exit( 1 );
+@@ -70,14 +66,12 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void fatal( va_alist )
+-va_dcl
++void
++fatal(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+
+- va_start( args );
+- fmt = va_arg( args, char * );
++ va_start(args, fmt);
+ fprintf( stderr, "Internal Error: " );
+ vfprintf( stderr, fmt, args );
+ exit( 2 );
+@@ -142,18 +136,16 @@
+
+ /*----------------------------------------------------------------------------*/
+
+-void mailmessage( va_alist )
+-va_dcl
++void
++mailmessage(const char *fmt, ...)
+ {
+ va_list args;
+- char *fmt;
+ FILE *popen(), *fp;
+ char cmdline[80];
+ if (whome == NULL) whome = getlogin();
+ sprintf(cmdline,"%s %s",mailprog,whome);
+ fp = popen(cmdline,"w");
+- va_start( args );
+- fmt = va_arg( args, char * );
++ va_start(args, fmt);
+ fprintf( fp, "MNM Warning: " );
+ vfprintf( fp, fmt, args );
+ va_end( args );