[packages/Glide_VG] - added format patch (fixes build with -Werror=format-security) - added include patch (avoid include

qboosh qboosh at pld-linux.org
Sat Sep 21 13:49:30 CEST 2013


commit 0c0bac19274e6c959a0ac8119af482e43fb225b8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sat Sep 21 13:49:54 2013 +0200

    - added format patch (fixes build with -Werror=format-security)
    - added include patch (avoid includes nested in function)
    - release 11

 Glide_VG-format.patch  | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++
 Glide_VG-include.patch | 41 +++++++++++++++++++++++++++
 Glide_VG.spec          |  6 +++-
 3 files changed, 121 insertions(+), 1 deletion(-)
---
diff --git a/Glide_VG.spec b/Glide_VG.spec
index e657c1d..20e7abe 100644
--- a/Glide_VG.spec
+++ b/Glide_VG.spec
@@ -6,7 +6,7 @@ Summary:	Glide runtime for 3Dfx Voodoo Graphics boards
 Summary(pl.UTF-8):	Środowisko Glide dla kart 3Dfx Voodoo Graphics
 Name:		Glide_VG
 Version:	2.46
-Release:	10
+Release:	11
 License:	3DFX GLIDE Source Code General Public License
 Group:		Libraries
 Source0:	Glide%{version}.tar.gz
@@ -17,6 +17,8 @@ Patch2:		%{name}-morearchs.patch
 Patch3:		%{name}-ioctl.patch
 Patch4:		%{name}-soname.patch
 Patch5:		%{name}-C_brainos.patch
+Patch6:		%{name}-format.patch
+Patch7:		%{name}-include.patch
 URL:		http://glide.sourceforge.net/
 %ifarch %{ix86}
 BuildRequires:	/usr/bin/gasp
@@ -74,6 +76,8 @@ Voodoo Graphics, Voodoo Rush lub Voodoo2.
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
+%patch7 -p1
 chmod +x swlibs/include/make/ostype
 
 %build
diff --git a/Glide_VG-format.patch b/Glide_VG-format.patch
new file mode 100644
index 0000000..03ff116
--- /dev/null
+++ b/Glide_VG-format.patch
@@ -0,0 +1,75 @@
+--- Glide_VG-2.46/swlibs/fxmisc/fximg.c.orig	1999-11-29 20:48:02.000000000 +0100
++++ Glide_VG-2.46/swlibs/fxmisc/fximg.c	2013-09-21 13:04:59.228788362 +0200
+@@ -1879,8 +1879,8 @@
+ 	    char buf[1024], *p;
+ 	    strcpy(buf,prefix);			// copy and replace semicolon
+ 	    if (p = strchr(buf,';')) *p = '\0';
+-	    fprintf(stderr,buf);
+-	    fprintf(stderr,"/");
++	    fputs(buf,stderr);
++	    fputs("/",stderr);
+ 	}
+ 	fprintf (stderr,"%s (%dx%d) ...", filename, info->any.width,info->any.height);
+ 	fflush(stderr);
+--- Glide_VG-2.46/swlibs/fxpci/pcilib/fxpci.c.orig	2013-09-21 13:02:16.251214671 +0200
++++ Glide_VG-2.46/swlibs/fxpci/pcilib/fxpci.c	2013-09-21 13:06:03.351768212 +0200
+@@ -2631,7 +2631,7 @@
+     OutputDebugString(msg);
+ #elif defined(MAPPL_MAPMEM_MINIPORT)
+ #elif defined(MAPPL_LINUX)
+-    fprintf(stderr, msg);
++    fputs(msg, stderr);
+ #else
+ #error "Unknown PCI target for pciOutputDebugString"
+ #endif
+--- Glide_VG-2.46/swlibs/fxpci/pcilib/fxlinux.c.orig	2013-09-21 13:06:52.450716558 +0200
++++ Glide_VG-2.46/swlibs/fxpci/pcilib/fxlinux.c	2013-09-21 13:10:57.885455498 +0200
+@@ -64,7 +64,7 @@
+ }
+ 
+ FxBool pciOutputDebugStringDD(const char *msg) {
+-  printf(msg);
++  fputs(msg,stdout);
+   return FXTRUE;
+ }
+ 
+--- Glide_VG-2.46/swlibs/fxpci/pcitools/pcirw.c.orig	1999-11-29 20:48:02.000000000 +0100
++++ Glide_VG-2.46/swlibs/fxpci/pcitools/pcirw.c	2013-09-21 13:41:51.784954404 +0200
+@@ -76,7 +76,7 @@
+     FxU32 classCode = 0;
+ 
+     if (!pciOpen()) {
+-        fprintf(stderr, pciGetErrorString());
++        fputs(pciGetErrorString(), stderr);
+         exit(100);
+     }
+     for ( deviceNumber = 0; deviceNumber < MAX_PCI_DEVICES; deviceNumber++ ) {
+@@ -329,7 +329,7 @@
+     // cleanup: unmap the card, close down the PCI bus and return
+     pciUnmapPhysical( (unsigned long)sst, sizeOfCard );
+     if ( !pciClose() ) {
+-        fprintf(stderr, pciGetErrorString());
++        fputs(pciGetErrorString(), stderr);
+         exit(3);
+     }
+     return 0;
+--- Glide_VG-2.46/sst1/glide/tests/tlib.c.orig	1999-11-29 20:48:23.000000000 +0100
++++ Glide_VG-2.46/sst1/glide/tests/tlib.c	2013-09-21 13:42:46.624171915 +0200
+@@ -1433,7 +1433,7 @@
+ 
+ FxBool
+ tlErrorMessage( char *err) {
+-  fprintf(stderr, err);
++  fputs(err, stderr);
+ } /* tlErrorMessage */
+ 
+ #else
+@@ -1472,7 +1472,7 @@
+ 
+ FxBool
+ tlErrorMessage( char *err) {
+-  fprintf(stderr, err);
++  fputs(err, stderr);
+ } /* tlErrorMessage */
+ 
+ #else   /* __WIN32__ */
diff --git a/Glide_VG-include.patch b/Glide_VG-include.patch
new file mode 100644
index 0000000..ec35eb0
--- /dev/null
+++ b/Glide_VG-include.patch
@@ -0,0 +1,41 @@
+--- Glide_VG-2.46/swlibs/fxmisc/fxos.c.orig	1999-11-29 20:48:02.000000000 +0100
++++ Glide_VG-2.46/swlibs/fxmisc/fxos.c	2013-09-21 13:14:33.118790946 +0200
+@@ -43,13 +43,22 @@
+ #include <fxos.h>
+ #endif
+ 
++#if defined ( __sparc__ ) || defined ( __DJGPP__ )
++#   include <sys/types.h>
++#   include <sys/timeb.h>
++#elif defined ( WIN32 ) || ( __DOS__ ) || defined(__FreeBSD__)
++#   include <time.h>
++#else
++#   include <sys/types.h>
++#   include <sys/times.h>
++#   include <sys/param.h>
++#endif
++
+ /* return current time in seconds (floating point)      */
+ float fxTime(void)
+ {
+ #if defined ( __sparc__ ) || defined ( __DJGPP__ )
+ /* times returns 0 in BSD Unix, so we use ftime instead */
+-#   include <sys/types.h>
+-#   include <sys/timeb.h>
+     struct timeb tb;
+     static time_t once;                 // saves first time value
+ 
+@@ -60,13 +69,9 @@
+     
+ #else
+ #if defined ( WIN32 ) || ( __DOS__ )
+-#   include <time.h>
+ #   define times(a) clock()
+ #   define HZ   CLOCKS_PER_SEC
+ #else
+-#   include <sys/types.h>
+-#   include <sys/times.h>
+-#   include <sys/param.h>
+     struct tms foo;
+ #endif
+     return times(&foo)/(float)HZ;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/Glide_VG.git/commitdiff/0c0bac19274e6c959a0ac8119af482e43fb225b8



More information about the pld-cvs-commit mailing list