1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

Fix build on -CURRENT.

Bump port revision.
This commit is contained in:
Max Khon 2003-10-27 20:25:47 +00:00
parent 29f220a5d5
commit 03e79f6d24
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=92349
9 changed files with 214 additions and 9 deletions

View File

@ -7,6 +7,7 @@
PORTNAME= tcpview
PORTVERSION= 1.0
PORTREVISION= 1
CATEGORIES= net
MASTER_SITES= ftp://ftp.cac.washington.edu/pub/noc-tools/tcpview/
EXTRACT_SUFX= .tar.Z
@ -20,12 +21,6 @@ USE_REINPLACE= yes
MAN1= tcpview.1
.include <bsd.port.pre.mk>
.if ${OSVERSION} >= 501000
BROKEN= "Does not compile"
.endif
post-patch:
.for f in nametoaddr.c addrtoname.c print-nfs.c detail-tcp.c tv_addrtoname.c
@${REINPLACE_CMD} -e 's/NTOHL/ntohl/ ; s/NTOHS/ntohs/' ${WRKSRC}/${f}
@ -34,4 +29,4 @@ post-patch:
post-install:
${INSTALL_DATA} ${WRKSRC}/DOC/Tcpview ${X11BASE}/lib/X11/app-defaults/
.include <bsd.port.post.mk>
.include <bsd.port.mk>

View File

@ -1,5 +1,14 @@
--- callbacks.c.orig Thu Feb 13 19:14:15 2003
+++ callbacks.c Thu Feb 13 19:14:42 2003
--- callbacks.c.orig Fri Apr 23 05:22:59 1993
+++ callbacks.c Tue Oct 28 02:03:28 2003
@@ -42,7 +42,7 @@
#include <stdlib.h>
#endif
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/types.h>
#include <sys/time.h>
#include <string.h>
@@ -66,7 +66,7 @@
extern Widget hex_text_widget; /* hex (bottom) window */
extern Widget packet_label;
@ -9,3 +18,52 @@
#ifdef __STDC__
void redisplay_current_list(void);
@@ -726,32 +726,35 @@
}
-void eprint(va_alist)
- va_dcl
+void eprintv(char *fmt, va_list ap)
+{
+ char str[128];
+
+ (void)vsprintf(str, fmt, ap);
+ ErrorDialog(summary_list_widget, "error", str);
+}
+
+
+void eprint(char *fmt, ...)
{
va_list args;
- char *fmt, str[128];
- va_start(args);
- fmt = va_arg(args, char *);
- (void)vsprintf(str,fmt,args);
+ va_start(args, fmt);
+ eprintv(fmt, args);
va_end(args);
-
- ErrorDialog(summary_list_widget,"error",str);
}
-void iprint(va_alist)
- va_dcl
+
+void iprint(char *fmt, ...)
{
va_list args;
- char *fmt, str[128];
+ char str[128];
Widget widget;
XmString ms;
Arg a[2];
int n;
- va_start(args);
- fmt = va_arg(args, char *);
+ va_start(args, fmt);
(void)vsprintf(str,fmt,args);
va_end(args);

View File

@ -0,0 +1,10 @@
--- capture.c.orig Tue Oct 28 02:13:49 2003
+++ capture.c Tue Oct 28 02:15:57 2003
@@ -37,7 +37,6 @@
#endif
#include <stdio.h>
-#include <varargs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/wait.h>

View File

@ -0,0 +1,30 @@
--- gencode.c.orig Fri Apr 23 04:40:01 1993
+++ gencode.c Tue Oct 28 02:03:44 2003
@@ -36,7 +36,7 @@
#include <net/bpf.h>
#ifdef TCPVIEW
-#include <varargs.h>
+#include <stdarg.h>
#include <setjmp.h>
static jmp_buf env;
#define error parse_error
@@ -97,10 +97,15 @@
static int cur_chunk;
#ifdef TCPVIEW
-void parse_error(va_alist)
- va_dcl
+extern eprintv(char *cp, va_list ap);
+
+void parse_error(char *cp, ...)
{
- eprint(va_alist);
+ va_list ap;
+
+ va_start(ap, cp);
+ eprintv(cp, ap);
+ va_end(ap);
longjmp(env,1);
}
#endif

View File

@ -0,0 +1,13 @@
--- interface.h.orig Tue Oct 28 01:36:19 2003
+++ interface.h Tue Oct 28 01:36:30 2003
@@ -59,8 +59,8 @@
extern char *lookup_device();
-extern void error();
-extern void warning();
+extern void error(char *, ...);
+extern void warning(char *, ...);
extern char *read_infile();
extern char *copy_argv();

View File

@ -0,0 +1,27 @@
--- print.c.orig Tue Oct 28 01:43:36 2003
+++ print.c Tue Oct 28 01:44:37 2003
@@ -36,21 +36,18 @@
"@(#) $Header: /usr/staff/martinh/tcpview/RCS/print.c,v 1.1 1993/04/22 20:33:56 martinh Exp $ (UW)";
#endif
-#include <varargs.h>
+#include <stdarg.h>
extern char *StrPtr;
extern void *Xfile;
extern int Zflag;
-int printf(va_alist)
- va_dcl
+int printf(char *fmt, ...)
{
va_list args;
- char *fmt;
int num;
- va_start(args);
- fmt = va_arg(args, char *);
+ va_start(args, fmt);
#ifdef TCPDUMP
(void)vprintf(fmt, args);
#else

View File

@ -0,0 +1,10 @@
--- tcpslice.c.orig Tue Oct 28 02:14:35 2003
+++ tcpslice.c Tue Oct 28 02:16:29 2003
@@ -36,7 +36,6 @@
#include <sys/time.h>
#include <sys/timeb.h>
#include <netinet/in.h>
-#include <varargs.h>
#include "savefile.h"
#include "version.h"

View File

@ -0,0 +1,13 @@
--- tcpview.h.orig Fri Apr 23 04:48:09 1993
+++ tcpview.h Tue Oct 28 02:02:49 2003
@@ -97,8 +97,8 @@
void perror();
#endif
-void iprint(); /* print Motif information */
-void eprint(); /* print Motif error */
+void iprint(char *, ...); /* print Motif information */
+void eprint(char *, ...); /* print Motif error */
void detail_ether();
void detail_tcp();

View File

@ -0,0 +1,49 @@
--- util.c.orig Fri Apr 23 04:40:36 1993
+++ util.c Tue Oct 28 01:59:11 2003
@@ -64,7 +64,7 @@
#include <sys/types.h>
#include <sys/time.h>
#include <ctype.h>
-#include <varargs.h>
+#include <stdarg.h>
#include <sys/file.h>
#include <sys/stat.h>
@@ -277,16 +277,13 @@
}
void
-error(va_alist)
- va_dcl
+error(char *cp, ...)
{
- register char *cp;
va_list ap;
(void)fprintf(stderr, "%s: ", stripdir(program_name));
- va_start(ap);
- cp = va_arg(ap, char *);
+ va_start(ap, cp);
(void)vfprintf(stderr, cp, ap);
va_end(ap);
if (*cp) {
@@ -301,16 +298,13 @@
/* VARARGS */
void
-warning(va_alist)
- va_dcl
+warning(char *cp, ...)
{
- register char *cp;
va_list ap;
(void)fprintf(stderr, "%s: warning: ", stripdir(program_name));
- va_start(ap);
- cp = va_arg(ap, char *);
+ va_start(ap, cp);
(void)vfprintf(stderr, cp, ap);
va_end(ap);
if (*cp) {