diff options
author | vs <vs@FreeBSD.org> | 2004-11-08 20:37:10 +0800 |
---|---|---|
committer | vs <vs@FreeBSD.org> | 2004-11-08 20:37:10 +0800 |
commit | 3301419beb8bc2dcd2c6ef3555e7eef005be2876 (patch) | |
tree | 4c8eebf81bf4798f76003260915a3df5f8049ba2 /net/socks5/files | |
parent | c02ffc52c7d29a5cfeac501a2485ccd83cde2cc8 (diff) | |
download | freebsd-ports-gnome-3301419beb8bc2dcd2c6ef3555e7eef005be2876.tar.gz freebsd-ports-gnome-3301419beb8bc2dcd2c6ef3555e7eef005be2876.tar.zst freebsd-ports-gnome-3301419beb8bc2dcd2c6ef3555e7eef005be2876.zip |
Fix varargs.h issue with gcc 3.4
PR: ports/71460
Submitted by: KIMURA Yasuhiro
Diffstat (limited to 'net/socks5/files')
-rw-r--r-- | net/socks5/files/patch-clients::ftp::ftp.c | 49 | ||||
-rw-r--r-- | net/socks5/files/patch-clients::telnet::commands.c | 51 |
2 files changed, 100 insertions, 0 deletions
diff --git a/net/socks5/files/patch-clients::ftp::ftp.c b/net/socks5/files/patch-clients::ftp::ftp.c new file mode 100644 index 000000000000..fa6b203075f3 --- /dev/null +++ b/net/socks5/files/patch-clients::ftp::ftp.c @@ -0,0 +1,49 @@ +--- clients/ftp/ftp.c.orig Thu Aug 17 00:38:44 2000 ++++ clients/ftp/ftp.c Tue Sep 7 20:41:35 2004 +@@ -48,7 +48,15 @@ + #include <fcntl.h> + #endif + ++#ifdef HAVE_STDARG_H ++#include <stdarg.h> ++#define VA_START(a, b) va_start((a), (b)) ++#define va_alist ... ++#define va_dcl ++#else + #include <varargs.h> ++#define VA_START(a, b) va_start((a)) ++#endif + + #ifdef FASCIST + #include <syslog.h> +@@ -241,9 +249,8 @@ + } + + /*VARARGS*/ +-int command(va_alist) va_dcl { ++int command(char *fmt, va_alist) va_dcl { + va_list ap; +- char *fmt; + int r; + Sig_t oldintr; + +@@ -251,8 +258,7 @@ + if (debug) { + printf("---> "); + +- va_start(ap); +- fmt = va_arg(ap, char *); ++ VA_START(ap, fmt); + if (strncmp("PASS ", fmt, 5) == 0) + printf("PASS XXXX"); + else +@@ -271,8 +277,7 @@ + + oldintr = Signal(SIGINT, cmdabort); + +- va_start(ap); +- fmt = va_arg(ap, char *); ++ VA_START(ap, fmt); + vfprintf(cout, fmt, ap); + va_end(ap); + diff --git a/net/socks5/files/patch-clients::telnet::commands.c b/net/socks5/files/patch-clients::telnet::commands.c new file mode 100644 index 000000000000..4e971362af78 --- /dev/null +++ b/net/socks5/files/patch-clients::telnet::commands.c @@ -0,0 +1,51 @@ +--- clients/telnet/commands.c.orig Thu Aug 17 00:38:46 2000 ++++ clients/telnet/commands.c Tue Sep 7 20:39:04 2004 +@@ -83,7 +83,17 @@ + #include <signal.h> + #include <ctype.h> + #include <pwd.h> ++ ++#ifdef HAVE_STDARG_H ++#include <stdarg.h> ++#define VA_START(a, b) va_start((a), (b)) ++#define va_alist ... ++#define va_dcl ++#else + #include <varargs.h> ++#define VA_START(a, b) va_start((a)) ++#endif ++ + #include <errno.h> + + #include <arpa/telnet.h> +@@ -122,7 +132,9 @@ + extern int Ambiguous(); + extern void herror(); + +-static int call(); ++typedef int (*intrtn_t)(); ++ ++static int call(intrtn_t routine, va_alist); + + typedef struct { + char *name; /* command name */ +@@ -2092,17 +2104,14 @@ + + /*VARARGS1*/ + static int +-call(va_alist) ++call(intrtn_t routine, va_alist) + va_dcl + { + va_list ap; +- typedef int (*intrtn_t)(); +- intrtn_t routine; + char *args[100]; + int argno = 0; + +- va_start(ap); +- routine = (va_arg(ap, intrtn_t)); ++ VA_START(ap, routine); + while ((args[argno++] = va_arg(ap, char *)) != 0) { + ; + } |