further data type fixes to ext/dba

This commit is contained in:
Anatol Belski 2017-05-29 10:14:47 +02:00
parent 29248d52b2
commit 32d7fa6f74
2 changed files with 6 additions and 6 deletions

View File

@ -228,7 +228,7 @@ static size_t php_dba_make_key(zval *key, char **key_str, char **key_free)
return len;
} else {
zval tmp;
int len;
size_t len;
ZVAL_COPY(&tmp, key);
convert_to_string(&tmp);
@ -613,7 +613,7 @@ dba_info *php_dba_find(const char* path)
{
zend_resource *le;
dba_info *info;
int numitems, i;
zend_long numitems, i;
numitems = zend_hash_next_free_element(&EG(regular_list));
for (i=1; i<numitems; i++) {
@ -642,7 +642,7 @@ static void php_dba_open(INTERNAL_FUNCTION_PARAMETERS, int persistent)
dba_info *info, *other;
dba_handler *hptr;
char *key = NULL, *error = NULL;
int keylen = 0;
size_t keylen = 0;
int i;
int lock_mode, lock_flag, lock_dbf = 0;
char *file_mode;

View File

@ -225,12 +225,12 @@ DBA_DELETE_FUNC(cdb)
/* {{{ cdb_file_lseek
php_stream_seek does not return actual position */
#if DBA_CDB_BUILTIN
int cdb_file_lseek(php_stream *fp, off_t offset, int whence) {
zend_off_t cdb_file_lseek(php_stream *fp, zend_off_t offset, int whence) {
php_stream_seek(fp, offset, whence);
return php_stream_tell(fp);
}
#else
int cdb_file_lseek(int fd, off_t offset, int whence) {
zend_off_t cdb_file_lseek(int fd, zend_off_t offset, int whence) {
return lseek(fd, offset, whence);
}
#endif
@ -238,7 +238,7 @@ int cdb_file_lseek(int fd, off_t offset, int whence) {
#define CSEEK(n) do { \
if (n >= cdb->eod) return NULL; \
if (cdb_file_lseek(cdb->file, (off_t)n, SEEK_SET) != (off_t) n) return NULL; \
if (cdb_file_lseek(cdb->file, (zend_off_t)n, SEEK_SET) != (zend_off_t) n) return NULL; \
} while (0)