tags 778189 + patch
thanks

I made a patch to fix this.
Might not be good but just fix it in experimental.
As attachment.

--
                                PaulLiu (劉穎駿)
E-mail: Ying-Chun Liu (PaulLiu) <paul...@debian.org>
Description: Fix FTBFS on gcc-5
 The gcc-5 (C99) has different definition of extern inline.
 This patch keep the inline function in header file.
 And then export it in exactly one compilation unit (.c file).
Author: Ying-Chun Liu (PaulLiu) <paul...@debian.org>
Bug-Debian: http://bugs.debian.org/778189
Last-Update: 2015-07-10
Index: xracer-0.96.9.1/xracer-0.96.9/include/xracer-player.h
===================================================================
--- xracer-0.96.9.1.orig/xracer-0.96.9/include/xracer-player.h
+++ xracer-0.96.9.1/xracer-0.96.9/include/xracer-player.h
@@ -130,79 +130,64 @@ extern void xrPlayerEndGame (void);
 extern void xrPlayerUpdate (const struct xrGameControls *controls);
 
 /* Inline structure accessors. */
-extern int xrPlayerHasExternalShield (const struct xrPlayer *player);
 
-extern inline int
+inline int
 xrPlayerHasExternalShield (const struct xrPlayer *player)
 {
   return player->has_external_shield;
 }
 
-extern int xrPlayerHasAutoPilot (const struct xrPlayer *player);
-
-extern inline int
+inline int
 xrPlayerHasAutoPilot (const struct xrPlayer *player)
 {
   return player->has_autopilot;
 }
 
 /* This always returns the position of the midpoint of the back line. */
-extern const GLfloat *xrPlayerGetPosition (const struct xrPlayer *player);
 
-extern inline const GLfloat *
+inline const GLfloat *
 xrPlayerGetPosition (const struct xrPlayer *player)
 {
   return player->backline_midpoint;
 }
 
-extern int xrPlayerGetSegment (const struct xrPlayer *player);
-
-extern inline int
+inline int
 xrPlayerGetSegment (const struct xrPlayer *player)
 {
   return player->seg[0];
 }
 
 /* Return the eye position, accounting for OOBE, if necessary. */
-extern const GLfloat *xrPlayerGetCameraEye (const struct xrPlayer *player,
-					    int oobe);
 
-extern inline const GLfloat *
+inline const GLfloat *
 xrPlayerGetCameraEye (const struct xrPlayer *player, int oobe)
 {
   return oobe ? player->eye_oobe : player->backline_midpoint;
 }
 
 /* Return the camera centre point, accounting for OOBE, if necessary. */
-extern const GLfloat *xrPlayerGetCameraCentre (const struct xrPlayer *player,
-					       int oobe);
 
-extern inline const GLfloat *
+inline const GLfloat *
 xrPlayerGetCameraCentre (const struct xrPlayer *player, int oobe)
 {
   return oobe ? player->centre_oobe : player->posn[0];
 }
 
 /* Return the camera up vector (this is unaffected by OOBE). */
-extern const GLfloat *xrPlayerGetCameraUp (const struct xrPlayer *player);
 
-extern inline const GLfloat *
+inline const GLfloat *
 xrPlayerGetCameraUp (const struct xrPlayer *player)
 {
   return player->up;
 }
 
-extern int xrPlayerGetSpeed (const struct xrPlayer *player);
-
-extern inline int
+inline int
 xrPlayerGetSpeed (const struct xrPlayer *player)
 {
   return xrMagnitude (player->momentum[0]) * 500.;
 }
 
-extern int xrPlayerGetPowerup (const struct xrPlayer *player);
-
-extern inline int
+inline int
 xrPlayerGetPowerup (const struct xrPlayer *player)
 {
   return player->powerup;
@@ -211,18 +196,16 @@ xrPlayerGetPowerup (const struct xrPlaye
 /* Return the player's current lap, counting from 1. After the player has
  * completed the game, this can return NR_LAPS + 1, so beware.
  */
-extern int xrPlayerGetCurrentLap (const struct xrPlayer *player);
 
-extern inline int
+inline int
 xrPlayerGetCurrentLap (const struct xrPlayer *player)
 {
   return player->displayed_current_lap + 1;
 }
 
 /* Return the player's current lap time. */
-extern double xrPlayerGetCurrentLapTime (const struct xrPlayer *player);
 
-extern inline double
+inline double
 xrPlayerGetCurrentLapTime (const struct xrPlayer *player)
 {
   return xrCurrentTime - player->start_of_lap_time;
@@ -232,9 +215,8 @@ xrPlayerGetCurrentLapTime (const struct
  * Note: the LAP argument starts counting from 1, and must be <= NR_LAPS.
  * This function does not return the current lap time.
  */
-extern double xrPlayerGetLapTime (const struct xrPlayer *player, int lap);
 
-extern inline double
+inline double
 xrPlayerGetLapTime (const struct xrPlayer *player, int lap)
 {
   lap--;
Index: xracer-0.96.9.1/xracer-0.96.9/include/xracer-player-external.h
===================================================================
--- /dev/null
+++ xracer-0.96.9.1/xracer-0.96.9/include/xracer-player-external.h
@@ -0,0 +1,19 @@
+#ifndef __xracer_player_external_001_h__
+#define __xracer_player_external_001_h__
+
+extern inline int xrPlayerHasExternalShield (const struct xrPlayer *player);
+extern inline int xrPlayerHasAutoPilot (const struct xrPlayer *player);
+extern inline const GLfloat *xrPlayerGetPosition (const struct xrPlayer *player);
+extern inline int xrPlayerGetSegment (const struct xrPlayer *player);
+extern inline const GLfloat *xrPlayerGetCameraEye (const struct xrPlayer *player,
+					    int oobe);
+extern inline const GLfloat *xrPlayerGetCameraCentre (const struct xrPlayer *player,
+					       int oobe);
+extern inline const GLfloat *xrPlayerGetCameraUp (const struct xrPlayer *player);
+extern inline int xrPlayerGetSpeed (const struct xrPlayer *player);
+extern inline int xrPlayerGetPowerup (const struct xrPlayer *player);
+extern inline int xrPlayerGetCurrentLap (const struct xrPlayer *player);
+extern inline double xrPlayerGetCurrentLapTime (const struct xrPlayer *player);
+extern inline double xrPlayerGetLapTime (const struct xrPlayer *player, int lap);
+
+#endif
Index: xracer-0.96.9.1/xracer-0.96.9/src/player.c
===================================================================
--- xracer-0.96.9.1.orig/xracer-0.96.9/src/player.c
+++ xracer-0.96.9.1/xracer-0.96.9/src/player.c
@@ -25,6 +25,7 @@
 #include "xracer.h"
 #include "xracer-log.h"
 #include "xracer-player.h"
+#include "xracer-player-external.h"
 #include "xracer-math.h"
 #include "xracer-track.h"
 #include "xracer-craft.h"
Index: xracer-0.96.9.1/xracer-0.96.9/include/xracer-craft-external.h
===================================================================
--- /dev/null
+++ xracer-0.96.9.1/xracer-0.96.9/include/xracer-craft-external.h
@@ -0,0 +1,6 @@
+#ifndef __xracer_craft_external_001_h__
+#define __xracer_craft_external_001_h__
+
+extern inline void xrCraftDisplay (const struct xrCraft *craft);
+
+#endif
Index: xracer-0.96.9.1/xracer-0.96.9/include/xracer-craft.h
===================================================================
--- xracer-0.96.9.1.orig/xracer-0.96.9/include/xracer-craft.h
+++ xracer-0.96.9.1/xracer-0.96.9/include/xracer-craft.h
@@ -68,9 +68,8 @@ extern const struct xrCraft *xrCraftGetD
 extern const struct xrCraft *xrCraftGetNext (const struct xrCraft *);
 
 /* Call display function for craft. */
-extern void xrCraftDisplay (const struct xrCraft *craft);
 
-extern inline void
+inline void
 xrCraftDisplay (const struct xrCraft *craft)
 {
   craft->display ();
Index: xracer-0.96.9.1/xracer-0.96.9/src/craft.c
===================================================================
--- xracer-0.96.9.1.orig/xracer-0.96.9/src/craft.c
+++ xracer-0.96.9.1/xracer-0.96.9/src/craft.c
@@ -41,6 +41,7 @@
 #include "xracer.h"
 #include "xracer-log.h"
 #include "xracer-craft.h"
+#include "xracer-craft-external.h"
 
 /* The internal list of craft. There is one list for each level. */
 struct xrCraft *craft_list[4];

Reply via email to