I need the patch below (since 2.3.37, maybe before) to be able to compile backglue.c on gcc 2.9x.
Regards, Buchan
--- servers/slapd/backglue.c Thu Aug 23 14:48:24 2007 +++ servers/slapd/backglue.c.latedeclaration Thu Aug 23 14:44:22 2007 @@ -619,9 +619,9 @@ int rw, Entry **e ) { - int rc; BackendDB *b0 = op->o_bd; op->o_bd = glue_back_select( b0, dn ); + int rc;
if ( op->o_bd->be_fetch ) { rc = op->o_bd->be_fetch( op, dn, oc, ad, rw, e );
Buchan Milne writes:
I need the patch below (since 2.3.37, maybe before) to be able to compile backglue.c on gcc 2.9x. (...)
int rc; BackendDB *b0 = op->o_bd; op->o_bd = glue_back_select( b0, dn );
int rc;
That breaks on C90 compilers. Declaration after non-declaration in block. Does it work to move 'int rc;' immediately after the b0 declaration instead?
Why are you using gcc 2.9x?
Buchan Milne wrote:
I need the patch below (since 2.3.37, maybe before) to be able to compile backglue.c on gcc 2.9x.
Regards, Buchan
--- servers/slapd/backglue.c Thu Aug 23 14:48:24 2007 +++ servers/slapd/backglue.c.latedeclaration Thu Aug 23 14:44:22 2007 @@ -619,9 +619,9 @@ int rw, Entry **e ) {
int rc; BackendDB *b0 = op->o_bd; op->o_bd = glue_back_select( b0, dn );
int rc; if ( op->o_bd->be_fetch ) { rc = op->o_bd->be_fetch( op, dn, oc, ad, rw, e );
I guess you need the reverse: the declaration of rc is incorrectly placed after the invocation of glue_back_select() in current 2.3 code.
p.
Ing. Pierangelo Masarati OpenLDAP Core Team
SysNet s.r.l. via Dossi, 8 - 27100 Pavia - ITALIA http://www.sys-net.it --------------------------------------- Office: +39 02 23998309 Mobile: +39 333 4963172 Email: pierangelo.masarati@sys-net.it ---------------------------------------