Just in case this helps anyone else.
I've just tried DBD::mysql for the first time and it failed to compile with gcc
2.95.3. It appears there are functions in dbdimp.c which declare variables
after code in:
1. dbd_st_prepare, code in #if before searchptr etc declared:
{
int i;
SV **svp;
D_imp_dbh_from_sth;
#if MYSQL_VERSION_ID >= SERVER_PREPARE_VERSION
/* Set default value of 'mysql_emulated_prepare' attribute for sth from dbh */
imp_sth->use_server_side_prepare= imp_dbh->use_server_side_prepare;
if (attribs)
{
svp= DBD_ATTRIB_GET_SVP(attribs, "mysql_emulated_prepare", 22);
imp_sth->use_server_side_prepare = (svp) ?
SvTRUE(*svp) : imp_dbh->use_server_side_prepare;
}
char *searchptr;
int col_type;
int limit_flag= 0;
int statement_length= 0;
MYSQL_BIND *bind, *bind_end;
imp_sth_phb_t *fbind;
2. same as 1, in mysql_st_internal_execute
else
{
D_imp_sth(h);
D_imp_dbh_from_sth;
bind_type_guessing= imp_dbh->bind_type_guessing;
}
char *salloc = parse_params(svsock,
sbuf,
&slen,
params,
num_params,
bind_type_guessing);
I fixed be moving the declarations.
Martin
--
Martin J. Evans
Easysoft Ltd, UK
Development