Package: bzflag
Version: 2.0.2.20050318
Severity: serious
Tags: patch

bzflag fails to build:

> if g++ -DHAVE_CONFIG_H -I. -I. -I../../include  -I../../include -Wall -W 
> -mcpu=i486  -g -O2 -DBZ_BUILD_DATE=20050721 -ffast-math -fno-exceptions 
> -fsigned-char -MT OpenGLGState.o -MD -MP -MF ".deps/OpenGLGState.Tpo" \
>   -c -o OpenGLGState.o `test -f 'OpenGLGState.cxx' || echo 
> './'`OpenGLGState.cxx; \
> then mv -f ".deps/OpenGLGState.Tpo" ".deps/OpenGLGState.Po"; \
> else rm -f ".deps/OpenGLGState.Tpo"; exit 1; \
> fi
> `-mcpu=' is deprecated. Use `-mtune=' or '-march=' instead.
> OpenGLGState.cxx:165: error: ISO C++ forbids declaration of 'SortedGState' 
> with no type
> OpenGLGState.cxx:165: error: expected ';' before '*' token
> OpenGLGState.cxx: In static member function 'static void 
> SortedGState::remove(OpenGLGStateRep*)':
> OpenGLGState.cxx:809: error: 'class OpenGLGStateRep' has no member named 
> 'bucket'
> OpenGLGState.cxx: In member function 'void 
> SortedGState::doAdd(OpenGLGStateRep*)':
> OpenGLGState.cxx:818: error: 'class OpenGLGStateRep' has no member named 
> 'bucket'
> OpenGLGState.cxx: In member function 'void 
> SortedGState::doRemove(OpenGLGStateRep*)':
> OpenGLGState.cxx:830: error: 'class OpenGLGStateRep' has no member named 
> 'bucket'
> OpenGLGState.cxx: In member function 'void 
> OpenGLGStateRep::addRenderNode(RenderNode*, const OpenGLGState*)':
> OpenGLGState.cxx:888: error: 'bucket' was not declared in this scope

The attached patch forward-declares SortedGState, which fixes this
problem.

-- 
Matt
diff -ru bzflag-2.0.2.20050318-orig/src/ogl/OpenGLGState.cxx 
bzflag-2.0.2.20050318/src/ogl/OpenGLGState.cxx
--- bzflag-2.0.2.20050318-orig/src/ogl/OpenGLGState.cxx 2005-01-17 
21:18:32.000000000 -0800
+++ bzflag-2.0.2.20050318/src/ogl/OpenGLGState.cxx      2005-07-27 
08:14:02.000000000 -0700
@@ -132,6 +132,8 @@
 // OpenGLGStateRep
 //
 
+class SortedGState;
+
 class OpenGLGStateRep {
   public:
                        OpenGLGStateRep();

Attachment: signature.asc
Description: Digital signature

Reply via email to