File: 03_gcc_4_3.patch

package info (click to toggle)
jigzo 0.6.1-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,232 kB
  • sloc: cpp: 1,745; makefile: 114
file content (40 lines) | stat: -rw-r--r-- 1,206 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
Description: avoid gcc 4.3 troubles
 This allows gcc 4.3 works fine and avoid troubles
 with some libraries
Author: Elías Alejandro Año Mendoza <ealmdz@gmail.com>

===================================================================
--- jigzo-0.6.1.orig/src/Loader.cxx	2009-06-24 20:16:37.000000000 -0500
+++ jigzo-0.6.1/src/Loader.cxx	2009-06-24 20:17:45.000000000 -0500
@@ -24,6 +24,7 @@
 {
 #include <png.h>
 #include <jpeglib.h>
+#include <stdlib.h>
 }
 
 void JpgLoader::Load(const std::string& filename,RGB& target,int x,int y)
Index: jigzo-0.6.1/src/main.cxx
===================================================================
--- jigzo-0.6.1.orig/src/main.cxx	2009-06-24 20:18:18.000000000 -0500
+++ jigzo-0.6.1/src/main.cxx	2009-06-24 20:19:50.000000000 -0500
@@ -47,6 +47,7 @@
 #include <fstream>
 #include <string>
 #include <sstream>
+#include <algorithm>
 
 #ifdef WIN32
 #include <io.h>
@@ -928,9 +929,9 @@
 	Assign(*texture,rgba,INTERPOLATION);
 }
 
-Rect DrawString(float x, float y, char *str, float scale)
+Rect DrawString(float x, float y, const char *str, float scale)
 {
-	char *ptr = str;
+	const char *ptr = str;
 	float tw = 0;
 	while (*ptr) {
 		Sprite *s = chars[int (*ptr++)];