hplip: needs dynamic library
[buildroot-gz.git] / package / ltris / 0001-fix-gcc5-build.patch
blob66d0fa3df7a6b4fb412fd1a83987685c9d50b5d5
1 Upstream patch to fix build with GCC 5
3 Obtained from the LGames Subversion repository with the following command:
4 svn diff -c164 svn://svn.code.sf.net/p/lgames/code/trunk/ltris
6 Signed-off-by: Rodrigo Rebello <rprebello@gmail.com>
8 Revision log message:
9 ------------------------------------------------------------------------
10 r164 | kulkanie | 2015-05-16 05:48:02 -0300 (Sat, 16 May 2015) | 1 line
12 removed all inline keywords
13 ------------------------------------------------------------------------
15 Line added to LTris ChangeLog concerning the change:
16 - removed all inline keywords to work with GCC 5 (2015/05/16 MS)
18 Author: Michael Speck
20 Index: src/sdl.c
21 ===================================================================
22 --- a/src/sdl.c (revision 163)
23 +++ b/src/sdl.c (revision 164)
24 @@ -244,7 +244,7 @@
25 #endif
27 /* return full path of bitmap */
28 -inline void get_full_bmp_path( char *full_path, char *file_name )
29 +void get_full_bmp_path( char *full_path, char *file_name )
31 sprintf(full_path, "%s/gfx/%s", SRC_DIR, file_name );
33 @@ -330,7 +330,7 @@
35 lock surface
37 -inline void lock_surf(SDL_Surface *sur)
38 +void lock_surf(SDL_Surface *sur)
40 if (SDL_MUSTLOCK(sur))
41 SDL_LockSurface(sur);
42 @@ -339,7 +339,7 @@
44 unlock surface
46 -inline void unlock_surf(SDL_Surface *sur)
47 +void unlock_surf(SDL_Surface *sur)
49 if (SDL_MUSTLOCK(sur))
50 SDL_UnlockSurface(sur);
51 @@ -666,7 +666,7 @@
53 lock font surface
55 -inline void lock_font(Font *fnt)
56 +void lock_font(Font *fnt)
58 if (SDL_MUSTLOCK(fnt->pic))
59 SDL_LockSurface(fnt->pic);
60 @@ -675,7 +675,7 @@
62 unlock font surface
64 -inline void unlock_font(Font *fnt)
65 +void unlock_font(Font *fnt)
67 if (SDL_MUSTLOCK(fnt->pic))
68 SDL_UnlockSurface(fnt->pic);
69 @@ -905,7 +905,7 @@
71 update rectangle (0,0,0,0)->fullscreen
73 -inline void refresh_screen(int x, int y, int w, int h)
74 +void refresh_screen(int x, int y, int w, int h)
76 SDL_UpdateRect(sdl.screen, x, y, w, h);
78 @@ -1055,7 +1055,7 @@
80 lock surface
82 -inline void lock_screen()
83 +void lock_screen()
85 if (SDL_MUSTLOCK(sdl.screen))
86 SDL_LockSurface(sdl.screen);
87 @@ -1064,7 +1064,7 @@
89 unlock surface
91 -inline void unlock_screen()
92 +void unlock_screen()
94 if (SDL_MUSTLOCK(sdl.screen))
95 SDL_UnlockSurface(sdl.screen);
96 @@ -1073,7 +1073,7 @@
98 flip hardware screens (double buffer)
100 -inline void flip_screen()
101 +void flip_screen()
103 SDL_Flip(sdl.screen);
105 @@ -1132,7 +1132,7 @@
107 get milliseconds since last call
109 -inline int get_time()
110 +int get_time()
112 int ms;
113 cur_time = SDL_GetTicks();
114 @@ -1148,7 +1148,7 @@
116 reset timer
118 -inline void reset_timer()
119 +void reset_timer()
121 last_time = SDL_GetTicks();
123 Index: src/sdl.h
124 ===================================================================
125 --- a/src/sdl.h (revision 163)
126 +++ b/src/sdl.h (revision 164)
127 @@ -41,8 +41,8 @@
128 SDL_Surface* load_surf(char *fname, int f);
129 SDL_Surface* create_surf(int w, int h, int f);
130 void free_surf( SDL_Surface **surf );
131 -inline void lock_surf(SDL_Surface *sur);
132 -inline void unlock_surf(SDL_Surface *sur);
133 +void lock_surf(SDL_Surface *sur);
134 +void unlock_surf(SDL_Surface *sur);
135 void blit_surf(void);
136 void alpha_blit_surf(int alpha);
137 void fill_surf(int c);
138 @@ -86,8 +86,8 @@
139 Font* load_fixed_font(char *fname, int off, int len, int w);
140 void free_font(Font **sfnt);
141 int write_text(Font *sfnt, SDL_Surface *dest, int x, int y, char *str, int alpha);
142 -inline void lock_font(Font *sfnt);
143 -inline void unlock_font(Font *sfnt);
144 +void lock_font(Font *sfnt);
145 +void unlock_font(Font *sfnt);
146 SDL_Rect last_write_rect(Font *fnt);
147 int text_width(Font *fnt, char *str);
149 @@ -132,14 +132,14 @@
150 char** get_mode_names( int *count );
151 int set_video_mode( Video_Mode mode );
152 void hardware_cap();
153 -inline void refresh_screen( int x, int y, int w, int h );
154 +void refresh_screen( int x, int y, int w, int h );
155 void refresh_rects();
156 void add_refresh_rect(int x, int y, int w, int h);
157 int wait_for_key();
158 void wait_for_click();
159 -inline void lock_screen();
160 -inline void unlock_screen();
161 -inline void flip_screen();
162 +void lock_screen();
163 +void unlock_screen();
164 +void flip_screen();
165 void fade_screen( int type, int ms );
166 void take_screenshot( int i );
168 @@ -148,8 +148,8 @@
169 SDL_Cursor* create_cursor( int width, int height, int hot_x, int hot_y, char *source );
171 /* timer */
172 -inline int get_time();
173 -inline void reset_timer();
174 +int get_time();
175 +void reset_timer();
177 #ifdef __cplusplus
179 Index: src/tools.c
180 ===================================================================
181 --- a/src/tools.c (revision 163)
182 +++ b/src/tools.c (revision 164)
183 @@ -23,7 +23,7 @@
184 #include "ltris.h"
186 /* compares to strings and returns true if their first strlen(str1) chars are equal */
187 -inline int strequal( char *str1, char *str2 )
188 +int strequal( char *str1, char *str2 )
190 if ( strlen( str1 ) != strlen( str2 ) ) return 0;
191 return ( !strncmp( str1, str2, strlen( str1 ) ) );
192 @@ -30,7 +30,7 @@
195 /* set delay to ms milliseconds */
196 -inline void delay_set( Delay *delay, int ms )
197 +void delay_set( Delay *delay, int ms )
199 delay->limit = ms;
200 delay->cur = 0;
201 @@ -37,13 +37,13 @@
204 /* reset delay ( cur = 0 )*/
205 -inline void delay_reset( Delay *delay )
206 +void delay_reset( Delay *delay )
208 delay->cur = 0;
211 /* check if times out and reset */
212 -inline int delay_timed_out( Delay *delay, int ms )
213 +int delay_timed_out( Delay *delay, int ms )
215 delay->cur += ms;
216 if ( delay->cur >= delay->limit ) {
217 @@ -56,12 +56,12 @@
220 /* set timer so that we have a time out next call of delay_timed_out() */
221 -inline void delay_force_time_out( Delay *delay )
222 +void delay_force_time_out( Delay *delay )
224 delay->cur = delay->limit;
227 -inline void goto_tile( int *x, int *y, int d )
228 +void goto_tile( int *x, int *y, int d )
230 /* 0 -up, clockwise, 5 - left up */
231 switch ( d ) {
232 @@ -326,24 +326,24 @@
233 the target value until reached when counter_update() is called.
234 ====================================================================
236 -inline void counter_set( Counter *counter, double value )
237 +void counter_set( Counter *counter, double value )
239 counter->value = value;
240 counter->approach = value;
242 -inline void counter_add( Counter *counter, double add )
243 +void counter_add( Counter *counter, double add )
245 counter->value += add;
247 -inline double counter_get_approach( Counter counter )
248 +double counter_get_approach( Counter counter )
250 return counter.approach;
252 -inline double counter_get( Counter counter )
253 +double counter_get( Counter counter )
255 return counter.value;
257 -inline void counter_update( Counter *counter, int ms )
258 +void counter_update( Counter *counter, int ms )
260 double change;
261 if ( counter->approach == counter->value ) return;
262 Index: src/bowl.c
263 ===================================================================
264 --- a/src/bowl.c (revision 163)
265 +++ b/src/bowl.c (revision 164)
266 @@ -333,7 +333,7 @@
267 Set a tile contents and pixel contents.
268 ====================================================================
270 -inline void bowl_set_tile( Bowl *bowl, int x, int y, int tile_id )
271 +void bowl_set_tile( Bowl *bowl, int x, int y, int tile_id )
273 int i, j = y * bowl->block_size;
274 bowl->contents[x][y] = tile_id;
275 Index: src/tools.h
276 ===================================================================
277 --- a/src/tools.h (revision 163)
278 +++ b/src/tools.h (revision 164)
279 @@ -33,7 +33,7 @@
280 #define VEC_DIST( vec1, vec2 ) ( sqrt( ( vec1.x - vec2.x ) * ( vec1.x - vec2.x ) + ( vec1.y - vec2.y ) * ( vec1.y - vec2.y ) ) )
282 /* compares to strings and returns true if their first strlen(str1) chars are equal */
283 -inline int strequal( char *str1, char *str2 );
284 +int strequal( char *str1, char *str2 );
286 /* delete lines */
287 void delete_lines( char **lines, int line_number );
288 @@ -45,16 +45,16 @@
289 } Delay;
291 /* set delay to ms milliseconds */
292 -inline void delay_set( Delay *delay, int ms );
293 +void delay_set( Delay *delay, int ms );
295 /* reset delay ( cur = 0 )*/
296 -inline void delay_reset( Delay *delay );
297 +void delay_reset( Delay *delay );
299 /* check if time's out ( add ms milliseconds )and reset */
300 -inline int delay_timed_out( Delay *delay, int ms );
301 +int delay_timed_out( Delay *delay, int ms );
303 /* set timer so that we have a time out next call of delay_timed_out() */
304 -inline void delay_force_time_out( Delay *delay );
305 +void delay_force_time_out( Delay *delay );
307 /* return distance betwteen to map positions */
308 int get_dist( int x1, int y1, int x2, int y2 );