diff options
author | krion <krion@FreeBSD.org> | 2003-08-30 06:06:15 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2003-08-30 06:06:15 +0800 |
commit | 9b2d3053caea2a70366b5d5c244934b8de5de8a4 (patch) | |
tree | 626af92401ddb0a20936d71ff04a91760493e8b2 /games | |
parent | 76e53c1722821822ec3745febfc03396cad273b7 (diff) | |
download | freebsd-ports-gnome-9b2d3053caea2a70366b5d5c244934b8de5de8a4.tar.gz freebsd-ports-gnome-9b2d3053caea2a70366b5d5c244934b8de5de8a4.tar.zst freebsd-ports-gnome-9b2d3053caea2a70366b5d5c244934b8de5de8a4.zip |
- Fix build on -current (varargs -> stdarg)
PR: 56156
Submitted by: Michael Edenfield <kutulu@kutulu.org>
Diffstat (limited to 'games')
-rw-r--r-- | games/blockade/files/patch-ab | 92 |
1 files changed, 86 insertions, 6 deletions
diff --git a/games/blockade/files/patch-ab b/games/blockade/files/patch-ab index d4bc02ae54dc..da2cb67dfd1a 100644 --- a/games/blockade/files/patch-ab +++ b/games/blockade/files/patch-ab @@ -1,5 +1,14 @@ ---- blockade.c.orig Fri Aug 23 16:51:21 2002 -+++ blockade.c Fri Aug 23 16:51:47 2002 +--- blockade.c.orig Mon May 24 16:16:10 1999 ++++ blockade.c Fri Aug 29 17:10:26 2003 +@@ -10,7 +10,7 @@ + #include <stdio.h> + #include <stdlib.h> + #include <string.h> +-#include <varargs.h> ++#include <stdarg.h> + #include <sys/time.h> + #include <ctype.h> + @@ -22,7 +22,6 @@ #include <X11/keysym.h> #include <X11/Xresource.h> @@ -8,12 +17,83 @@ #define NEW(t) ((t *)malloc(sizeof(t))) #define OLD(v) free((char *)(v)) -@@ -33,8 +32,6 @@ - #include "blockade-snd.h" +@@ -34,8 +33,6 @@ char **argvec; -- --char *getenv(); +-char *getenv(); +- XrmDatabase db; char *defaults = "\ + *Background: black\n\ +@@ -285,15 +282,12 @@ + /********************************************************************/ + /********************************************************************/ + +-void bugchk(va_alist) +-va_dcl ++void bugchk(char *fmt, ...) + { + va_list ap; +- char *fmt; + + fprintf(stderr,"INTERNAL ERROR: "); +- va_start(ap); +- fmt = va_arg(ap,char *); ++ va_start(ap, fmt); + vfprintf(stderr,fmt,ap); + va_end(ap); + fprintf(stderr,"\n"); +@@ -1060,24 +1054,22 @@ + winshadow.font = None; /* ie, the default font */ + } + +-void setup_gc(va_alist) +-va_dcl ++void setup_gc(long int bit, ...) + { + va_list ap; +- long int bit; + int setdeffont; + unsigned long int gcmask; + GC gc; + XGCValues *shadow; + XGCValues gcval; + +- va_start(ap); ++ va_start(ap, bit); + gc = wingc; + shadow = &winshadow; + setdeffont = 0; + gcmask = 0; + while (1) +- { bit = va_arg(ap,long int); ++ { + switch (bit) + { default: + fprintf(stderr,"Bad bit 0x%lx to setup_gc\n",bit); +@@ -1125,6 +1117,7 @@ + } + break; + } ++ bit = va_arg(ap,long int); + } + } + +@@ -2831,14 +2824,11 @@ + XMoveResizeWindow(disp,msgwin,(topw-msg_w)/2,gamey+(gameh-msg_h)/2,msg_w,msg_h); + } + +-void popmsg(va_alist) +-va_dcl ++void popmsg(char *fmt, ...) + { + va_list ap; +- char *fmt; + +- va_start(ap); +- fmt = va_arg(ap,char *); ++ va_start(ap, fmt); + vsprintf(&msg_buf[0],fmt,ap); + msg_len = strlen(&msg_buf[0]); + va_end(ap); |