Compiling trunk

Stefan Winter stefan.winter at restena.lu
Fri Jan 4 14:05:41 CET 2008


Hi,

I managed to find an ancient box with gcc 2.95.3, and couldn't
compile current CVS HEAD. I wonder if anyone cares; should I
report further issues on such old compilers? In any case, this
one here is:

gmake[4]: Entering directory `/root/radiusd/src/lib'
/root/radiusd/libtool --mode=compile gcc  -g -O2 -D_LIBRADIUS -I/root/radiusd/src -c valuepair.c
 gcc -g -O2 -D_LIBRADIUS -I/root/radiusd/src -c valuepair.c  -fPIC -DPIC -o .libs/valuepair.o
valuepair.c:24: warning: `used' attribute directive ignored
In file included from valuepair.c:26:
/root/radiusd/src/freeradius-devel/libradius.h:28: warning: `used' attribute directive ignored
In file included from /root/radiusd/src/freeradius-devel/libradius.h:30,
                 from valuepair.c:26:
/root/radiusd/src/freeradius-devel/missing.h:13: warning: `used' attribute directive ignored
In file included from /root/radiusd/src/freeradius-devel/libradius.h:41,
                 from valuepair.c:26:
/root/radiusd/src/freeradius-devel/token.h:27: warning: `used' attribute directive ignored
In file included from /root/radiusd/src/freeradius-devel/libradius.h:42,
                 from valuepair.c:26:
/root/radiusd/src/freeradius-devel/hash.h:28: warning: `used' attribute directive ignored
In file included from /root/radiusd/src/freeradius-devel/libradius.h:54,
                 from valuepair.c:26:
/root/radiusd/src/freeradius-devel/md4.h:13: warning: `used' attribute directive ignored
In file included from /root/radiusd/src/freeradius-devel/libradius.h:452,
                 from valuepair.c:26:
/root/radiusd/src/freeradius-devel/packet.h:28: warning: `used' attribute directive ignored
valuepair.c: In function `pairmake_any':
valuepair.c:1203: parse error before `char'
valuepair.c:1210: `buffer' undeclared (first use in this function)
valuepair.c:1210: (Each undeclared identifier is reported only once
valuepair.c:1210: for each function it appears in.)
gmake[4]: *** [valuepair.lo] Error 1
gmake[4]: Leaving directory `/root/radiusd/src/lib'
gmake[3]: *** [common] Error 2
gmake[3]: Leaving directory `/root/radiusd/src'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/root/radiusd/src'
gmake[1]: *** [common] Error 2
gmake[1]: Leaving directory `/root/radiusd'
make: *** [all] Error 2

And valuepair.c has on 1203:

(1202)                        q = strchr(p, '-');
(1203)                        char buffer[256];

Proper C still requires that variable declarations are at the beginning of
a block, even though recent compilers are quite forgiving in that respect.

Reversing the two lines fixed it, if anyone cares enough.

Greetings,

Stefan

-- 
Stefan WINTER

Stiftung RESTENA - Réseau Téléinformatique de l'Education Nationale et de 
la Recherche
Ingenieur Forschung & Entwicklung

6, rue Richard Coudenhove-Kalergi
L-1359 Luxembourg
E-Mail: stefan.winter at restena.lu     Tel.:     +352 424409-1
http://www.restena.lu                Fax:      +352 422473
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.freeradius.org/pipermail/freeradius-devel/attachments/20080104/85dcc68c/attachment.pgp>


More information about the Freeradius-Devel mailing list