|
From: Malcolm T. <ma...@co...> - 2004-03-11 16:35:22
|
Hi Brian,
On Wed, 2004-03-10 at 18:09 -0800, Brian Thomason wrote:
> Hey everyone, I have an issue here. I've been attempting to compile
> scrollkeeper 0.3.14-5 to no avail with GCC 2.95-4. I have attempted to
> compile against Debian SID as well as LindowsOS, but receive the same
> error each time.
>
> I know, GCC 2.95-4 is dated, but it's what we use in our distro, so any
> help would be greatly appreciated. (Drunken chimps have been known to
> bang out better C code than me)
>
> -Brian
>
> /bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I. -I. -I..
> -I/usr/include/libxml2 -I/usr/include/libxml2
> -DSCROLLKEEPER_STATEDIR=\""/var"\" -Wall -g -O2 -c -o install.lo
> `test -f 'install.c' || echo './'`install.c
> rm -f .libs/install.lo
> gcc -DHAVE_CONFIG_H -I. -I. -I.. -I/usr/include/libxml2
> -I/usr/include/libxml2 -DSCROLLKEEPER_STATEDIR=\"/var\" -Wall -g -O2 -c
> install.c -Wp,-MD,.deps/install.TPlo -fPIC -DPIC -o .libs/install.lo
> install.c: In function `add_doc_to_content_list':
> install.c:523: parse error before `*'
> install.c:525: `categorycode' undeclared (first use in this function)
> install.c:525: (Each undeclared identifier is reported only once
> install.c:525: for each function it appears in.)
> make[2]: *** [install.lo] Error 1
> make[2]: Leaving directory `/os/scrollkeeper/scrollkeeper-0.3.14/libs'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/os/scrollkeeper/scrollkeeper-0.3.14'
> make: *** [all] Error 2
OK, this is due to a brain failure on my part just before the last
release. I let a C99 construct slip into the code from a contributed
patch.
The problem is fixed in CVS and I am going to try to make a release this
weekend or early next week of 0.3.15.
The simple fix is to find the line that is causing the problem ("xmlChar
*categorycode;") and move it up to before the "if" statement just above
it (so move it up about three lines). That will mean that the variable
is declared at the top of the code block, rather than after some
statements and it will be C89 compatible again.
Cheers,
Malcolm
|