Package: globs / 0.2.0~svn50-6

0004-Force-prototypes.patch Patch series | download
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
From: TANIGUCHI Takaki <takaki@debian.org>
Date: Fri, 9 Nov 2018 11:08:42 +0900
Subject: Force prototypes

---
 src/benchmarks/GLSL_parallax/extra.c    | 3 +++
 src/benchmarks/GLSL_parallax/init.c     | 4 ++++
 src/benchmarks/GLSL_parallax/main.c     | 1 +
 src/benchmarks/GLSL_parallax/textfile.c | 1 +
 src/benchmarks/GL_shadow/object.c       | 1 +
 src/benchmarks/GL_smoke/particle.c      | 1 +
 src/benchmarks/SConstruct               | 2 +-
 src/benchmarks/check_time.c             | 1 +
 src/benchmarks/get_options.c            | 1 +
 9 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/src/benchmarks/GLSL_parallax/extra.c b/src/benchmarks/GLSL_parallax/extra.c
index 718a09d..d112902 100644
--- a/src/benchmarks/GLSL_parallax/extra.c
+++ b/src/benchmarks/GLSL_parallax/extra.c
@@ -17,6 +17,8 @@
 */
 
 
+#define GL_GLEXT_PROTOTYPES
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <math.h>
@@ -26,6 +28,7 @@
 #include <GL/glext.h> 
 
 #include "init.h"
+#include "extra.h"
 
 void UpdateLight(struct Light *l)
 {
diff --git a/src/benchmarks/GLSL_parallax/init.c b/src/benchmarks/GLSL_parallax/init.c
index 5aa7612..07b8fae 100644
--- a/src/benchmarks/GLSL_parallax/init.c
+++ b/src/benchmarks/GLSL_parallax/init.c
@@ -17,15 +17,19 @@
 */
 
 
+#define GL_GLEXT_PROTOTYPES
+
 #include <stdio.h>
 #include <stdlib.h>
 
 #include <SDL/SDL.h>
+#include <SDL/SDL_image.h>
 #include <GL/gl.h>
 #include <GL/glext.h> 
 
 #include "init.h"
 #include "textfile.h"
+#include "extra.h"
 
 
 void InitLighting(struct Light *l, struct Material *m)
diff --git a/src/benchmarks/GLSL_parallax/main.c b/src/benchmarks/GLSL_parallax/main.c
index 7524295..2313dc7 100644
--- a/src/benchmarks/GLSL_parallax/main.c
+++ b/src/benchmarks/GLSL_parallax/main.c
@@ -16,6 +16,7 @@
    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */
 
+#define GL_GLEXT_PROTOTYPES
 
 #include <stdio.h>
 #include <stdlib.h>
diff --git a/src/benchmarks/GLSL_parallax/textfile.c b/src/benchmarks/GLSL_parallax/textfile.c
index 9ab3406..818fef8 100644
--- a/src/benchmarks/GLSL_parallax/textfile.c
+++ b/src/benchmarks/GLSL_parallax/textfile.c
@@ -16,6 +16,7 @@
 #include <string.h>
 #include <sys/types.h>
 #include <unistd.h>
+#include "textfile.h"
 
 
 char *textFileRead(char *fn) {
diff --git a/src/benchmarks/GL_shadow/object.c b/src/benchmarks/GL_shadow/object.c
index 7eff1b6..2d3369a 100644
--- a/src/benchmarks/GL_shadow/object.c
+++ b/src/benchmarks/GL_shadow/object.c
@@ -8,6 +8,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <SDL/SDL.h>
+#include <SDL/SDL_image.h>
 #include <GL/gl.h>
 #include "object.h"
 
diff --git a/src/benchmarks/GL_smoke/particle.c b/src/benchmarks/GL_smoke/particle.c
index 424e00d..c017bcf 100644
--- a/src/benchmarks/GL_smoke/particle.c
+++ b/src/benchmarks/GL_smoke/particle.c
@@ -4,6 +4,7 @@
 
 #include <stdlib.h>
 #include <SDL/SDL.h>
+#include <SDL/SDL_image.h>
 #include <GL/gl.h>
 
 #include "particle.h"
diff --git a/src/benchmarks/SConstruct b/src/benchmarks/SConstruct
index 227d2ac..22f1d86 100644
--- a/src/benchmarks/SConstruct
+++ b/src/benchmarks/SConstruct
@@ -13,7 +13,7 @@ except SCons.Errors.UserError:
 	install_dir = os.path.join(root, prefix, 'share/globs/benchmarks')
 
 # create build environment
-env = Environment(CCFLAGS = '-g')
+env = Environment(CCFLAGS = '-g -Werror=missing-prototypes -Werror=implicit-function-declaration')
 
 # determine compiler and linker flags for SDL
 env.ParseConfig('sdl-config --cflags')
diff --git a/src/benchmarks/check_time.c b/src/benchmarks/check_time.c
index 5d2d838..2cef3bd 100644
--- a/src/benchmarks/check_time.c
+++ b/src/benchmarks/check_time.c
@@ -1,5 +1,6 @@
 #include <stdio.h>
 #include <sys/time.h>
+#include "check_time.h"
 
 long int check_time(int time)
 {
diff --git a/src/benchmarks/get_options.c b/src/benchmarks/get_options.c
index 9bcc67b..23ec4b5 100644
--- a/src/benchmarks/get_options.c
+++ b/src/benchmarks/get_options.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 #include <getopt.h>
 #include "get_options.h"