We are still battling problems with 64 bit builds and it seems that how spprintf is handled is the key to the problem. On my own builds on Linux64 and Windows64, the following works ...

char *_php_ibase_quad_to_string(ISC_QUAD const qd) /* {{{ */
{
char *result;
        
/* shortcut for most common case */
if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) {
spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd);
} else {
ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low;
spprintf(&result, BLOB_ID_LEN+1, "0x%0*" LL_MASK "x", 16, res);
}
return result;
}

but people are reporting that they have to switch back to the previous sprintf based version to get it to work ...
char *_php_ibase_quad_to_string(ISC_QUAD const qd) /* {{{ */
{
char *result = (char *) emalloc(BLOB_ID_LEN+1);
/* shortcut for most common case */
if (sizeof(ISC_QUAD) == sizeof(ISC_UINT64)) {
sprintf(result, "0x%0*" LL_MASK "x", 16, *(ISC_UINT64*)(void *) &qd);
} else {
ISC_UINT64 res = ((ISC_UINT64) qd.gds_quad_high << 0x20) | qd.gds_quad_low;
sprintf(result, "0x%0*" LL_MASK "x", 16, res);
}
result[BLOB_ID_LEN] = '\0';
return result;
}

It would seem that while the 'memory allocation standard' was changed around 5.2.0, at which time php_interbase developed the problem, there was nothing actually done to the code around 5.2.6 which fixed it? Only how it was compiled seems to have changed .... although I'm not certain that I am actually looking in the right place following the move to SVN

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to