** This routine installs a default busy handler that waits for the
** specified number of milliseconds before returning 0.
*/
-void sqlite_busy_timeout(sqlite *db, int ms){
+void sqlite_busy_timeout(sqlite *db, long ms){
if( ms>0 ){
sqlite_busy_handler(db, sqliteDefaultBusyCallback, (void*)ms);
}else{
int nAlloc;
int nRow;
int nColumn;
- int nData;
+ long nData;
int rc;
} TabResult;
char *zP3;
char zPtr[40];
if( pOp->p3type==P3_POINTER ){
- sprintf(zPtr, "ptr(%#x)", (int)pOp->p3);
+ sprintf(zPtr, "ptr(%#lx)", (long)pOp->p3);
zP3 = zPtr;
}else{
zP3 = pOp->p3;
sprintf(p->zStack[2],"%d", p->aOp[i].p1);
sprintf(p->zStack[3],"%d", p->aOp[i].p2);
if( p->aOp[i].p3type==P3_POINTER ){
- sprintf(p->aStack[4].z, "ptr(%#x)", (int)p->aOp[i].p3);
+ sprintf(p->aStack[4].z, "ptr(%#lx)", (long)p->aOp[i].p3);
p->zStack[4] = p->aStack[4].z;
}else{
p->zStack[4] = p->aOp[i].p3;
struct tm *ta, tmbuf;
time_t t, seconds;
int i, gmadjust, arg_count = ZEND_NUM_ARGS();
- int is_dst = -1, val, chgsecs = 0;
+ int is_dst = -1, chgsecs = 0;
+ long val;
if (arg_count > 7 || zend_get_parameters_array_ex(arg_count, arguments) == FAILURE) {
WRONG_PARAM_COUNT;
if (!php_var_unserialize(&return_value, &p, p + Z_STRLEN_PP(buf), &var_hash TSRMLS_CC)) {
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
zval_dtor(return_value);
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %d of %d bytes", p - Z_STRVAL_PP(buf), Z_STRLEN_PP(buf));
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "Error at offset %ld of %d bytes", (long)(p - Z_STRVAL_PP(buf)), Z_STRLEN_PP(buf));
RETURN_FALSE;
}
PHP_VAR_UNSERIALIZE_DESTROY(var_hash);
while (isdigit((int)*str)) { \
num *= 10; \
num += NUM(*str++); \
- if (num >= LONG_MAX / 10) { \
+ if (num >= INT_MAX / 10) { \
while (isdigit((int)*str++)); \
break; \
} \
/* don't allow strange buffer overruns due to bogus return */
if (didwrite > count) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote %zd bytes more data than requested (%zd written, %zd max)",
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_WRITE " wrote %ld bytes more data than requested (%ld written, %ld max)",
us->wrapper->classname,
- didwrite - count, didwrite, count);
+ (long)(didwrite - count), (long)didwrite, (long)count);
didwrite = count;
}
convert_to_string(retval);
didread = Z_STRLEN_P(retval);
if (didread > count) {
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read %zd bytes more data than requested (%zd read, %zd max) - excess data will be lost",
- us->wrapper->classname, didread - count, didread, count);
+ php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s::" USERSTREAM_READ " - read %ld bytes more data than requested (%ld read, %ld max) - excess data will be lost",
+ us->wrapper->classname, (long)(didread - count), (long)didread, (long)count);
didread = count;
}
if (didread > 0)
if (didwrite <= 0) {
char *estr = php_socket_strerror(php_socket_errno(), NULL, 0);
- php_error_docref(NULL TSRMLS_CC, E_NOTICE, "send of %d bytes failed with errno=%d %s",
- count, php_socket_errno(), estr);
+ php_error_docref(NULL TSRMLS_CC, E_NOTICE, "send of %ld bytes failed with errno=%d %s",
+ (long)count, php_socket_errno(), estr);
efree(estr);
}