Package: lxdoom
Severity: normal
Tags: patch
When building 'lxdoom' on amd64 with gcc-4.0,
I get the following error:
r_segs.c:50: error: static declaration of 'segtextured' follows non-static
declaration
r_bsp.h:46: error: previous declaration of 'segtextured' was here
r_segs.c:51: error: static declaration of 'markfloor' follows non-static
declaration
r_bsp.h:47: error: previous declaration of 'markfloor' was here
r_segs.c:52: error: static declaration of 'markceiling' follows non-static
declaration
r_bsp.h:48: error: previous declaration of 'markceiling' was here
r_segs.c:68: error: static declaration of 'rw_x' follows non-static declaration
r_bsp.h:44: error: previous declaration of 'rw_x' was here
r_segs.c:69: error: static declaration of 'rw_stopx' follows non-static
declaration
r_bsp.h:45: error: previous declaration of 'rw_stopx' was here
make[3]: *** [r_segs.o] Error 1
make[3]: Leaving directory `/lxdoom-1.4.4/src'
With the attached patch 'lxdoom' can be compiled
on amd64 using gcc-4.0.
The attached patch includes a patch which was already necessary with gcc-3.4.
Regards
Andreas Jochens
diff -urN ../tmp-orig/lxdoom-1.4.4/src/r_bsp.h ./src/r_bsp.h
--- ../tmp-orig/lxdoom-1.4.4/src/r_bsp.h 1999-10-12 15:00:57.000000000
+0200
+++ ./src/r_bsp.h 2005-03-02 16:14:17.828340100 +0100
@@ -41,11 +41,6 @@
extern line_t *linedef;
extern sector_t *frontsector;
extern sector_t *backsector;
-extern int rw_x;
-extern int rw_stopx;
-extern boolean segtextured;
-extern boolean markfloor; /* false if the back side is the same plane */
-extern boolean markceiling;
/* old code -- killough:
* extern drawseg_t drawsegs[MAXDRAWSEGS];
diff -urN ../tmp-orig/lxdoom-1.4.4/src/d_main.c ./src/d_main.c
--- ../tmp-orig/lxdoom-1.4.4/src/d_main.c 2005-03-02 16:14:58.894413590
+0100
+++ ./src/d_main.c 2005-03-02 16:13:35.525505328 +0100
@@ -232,7 +232,6 @@
case -1:
case GS_LEVEL:
V_SetPalette(0); // cph - use default (basic) palette
- default:
}
switch (gamestate) {
@@ -245,7 +244,6 @@
case GS_DEMOSCREEN:
D_PageDrawer();
break;
- default:
}
} else if (gametic) { // In a level
boolean redrawborderstuff;
diff -urN ../tmp-orig/lxdoom-1.4.4/src/g_game.c ./src/g_game.c
--- ../tmp-orig/lxdoom-1.4.4/src/g_game.c 2005-03-02 16:14:58.892413976
+0100
+++ ./src/g_game.c 2005-03-02 16:13:35.526505135 +0100
@@ -871,7 +871,6 @@
switch (prevgamestate) {
case GS_INTERMISSION:
WI_End();
- default:
}
prevgamestate = gamestate;
}
diff -urN ../tmp-orig/lxdoom-1.4.4/src/i_main.h ./src/i_main.h
--- ../tmp-orig/lxdoom-1.4.4/src/i_main.h 2000-03-16 14:27:29.000000000
+0100
+++ ./src/i_main.h 2005-03-02 16:13:35.526505135 +0100
@@ -44,9 +44,7 @@
extern int broken_pipe;
extern int (*I_GetTime)(void);
-#ifdef SECURE_UID
extern uid_t stored_euid; /* UID that the SVGALib I_InitGraphics switches to
before vga_init() */
-#endif
#endif
diff -urN ../tmp-orig/lxdoom-1.4.4/src/l_main.c ./src/l_main.c
--- ../tmp-orig/lxdoom-1.4.4/src/l_main.c 2000-03-16 14:27:29.000000000
+0100
+++ ./src/l_main.c 2005-03-02 16:13:35.527504942 +0100
@@ -314,9 +314,7 @@
}
}
-#ifdef SECURE_UID
uid_t stored_euid = -1;
-#endif
int main(int argc, const char * const * argv)
{
diff -urN ../tmp-orig/lxdoom-1.4.4/src/l_soundgen.c ./src/l_soundgen.c
--- ../tmp-orig/lxdoom-1.4.4/src/l_soundgen.c 1999-10-12 15:01:11.000000000
+0200
+++ ./src/l_soundgen.c 2005-03-02 16:13:35.527504942 +0100
@@ -40,6 +40,7 @@
#include <limits.h>
#include <math.h>
#include <string.h>
+#include <errno.h>
#ifdef HAVE_CONFIG_H
#include "../config.h"
@@ -179,7 +180,6 @@
static void I_Ioctl( int fd, int command, int* arg )
{
int rc;
- extern int errno;
rc = ioctl(fd, command, arg);
if (rc < 0) {
diff -urN ../tmp-orig/lxdoom-1.4.4/src/p_maputl.c ./src/p_maputl.c
--- ../tmp-orig/lxdoom-1.4.4/src/p_maputl.c 1999-10-12 15:01:13.000000000
+0200
+++ ./src/p_maputl.c 2005-03-02 16:13:35.527504942 +0100
@@ -322,7 +322,7 @@
//
// A fast function for testing intersections between things and linedefs.
-boolean CONSTFUNC ThingIsOnLine(const mobj_t *t, const line_t *l)
+boolean ThingIsOnLine(const mobj_t *t, const line_t *l)
{
int dx = l->dx >> FRACBITS; // Linedef vector
int dy = l->dy >> FRACBITS;
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]