diff options
author | Ard Biesheuvel <abies@php.net> | 2004-02-25 20:16:27 +0000 |
---|---|---|
committer | Ard Biesheuvel <abies@php.net> | 2004-02-25 20:16:27 +0000 |
commit | 81f05c18f5f3baf44fd8eb60e4b309bfe65562dd (patch) | |
tree | 3ec5cff99747dcfd6bfdcf90d2d4439a977793e6 | |
parent | b1d8f104502ac628fba97a70ed5320afd7811714 (diff) | |
download | php-git-81f05c18f5f3baf44fd8eb60e4b309bfe65562dd.tar.gz |
Wordsize fixes
-rw-r--r-- | ext/bcmath/bcmath.c | 2 | ||||
-rw-r--r-- | ext/ftp/php_ftp.c | 2 | ||||
-rw-r--r-- | ext/mysqli/mysqli_nonapi.c | 2 | ||||
-rw-r--r-- | ext/mysqli/mysqli_report.c | 2 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 2 | ||||
-rw-r--r-- | ext/pgsql/pgsql.c | 7 | ||||
-rw-r--r-- | ext/soap/soap.c | 2 | ||||
-rwxr-xr-x | ext/spl/spl_iterators.c | 4 | ||||
-rw-r--r-- | ext/sqlite/sqlite.c | 14 | ||||
-rw-r--r-- | ext/standard/dir.c | 2 | ||||
-rw-r--r-- | ext/standard/file.c | 3 | ||||
-rw-r--r-- | ext/standard/streamsfuncs.c | 3 | ||||
-rw-r--r-- | ext/standard/string.c | 3 | ||||
-rw-r--r-- | ext/standard/sunfuncs.c | 3 | ||||
-rw-r--r-- | ext/standard/var.c | 2 | ||||
-rw-r--r-- | ext/w32api/w32api.c | 4 |
16 files changed, 31 insertions, 26 deletions
diff --git a/ext/bcmath/bcmath.c b/ext/bcmath/bcmath.c index d3e4c53ab5..b500458ed1 100644 --- a/ext/bcmath/bcmath.c +++ b/ext/bcmath/bcmath.c @@ -367,7 +367,7 @@ PHP_FUNCTION(bcpowmod) char *left, *right, *modulous; int left_len, right_len, modulous_len; bc_num first, second, mod, result; - int scale = BCG(bc_precision); + long scale = BCG(bc_precision); if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sss|l", &left, &left_len, &right, &right_len, &modulous, &modulous_len, &scale) == FAILURE) { WRONG_PARAM_COUNT; diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c index ae5c2bad90..0466ed99aa 100644 --- a/ext/ftp/php_ftp.c +++ b/ext/ftp/php_ftp.c @@ -444,7 +444,7 @@ PHP_FUNCTION(ftp_alloc) { zval *z_ftp, *zresponse = NULL; ftpbuf_t *ftp; - int size, ret; + long size, ret; char *response = NULL; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &z_ftp, &size, &zresponse) == FAILURE) { diff --git a/ext/mysqli/mysqli_nonapi.c b/ext/mysqli/mysqli_nonapi.c index cf97f65299..e010402312 100644 --- a/ext/mysqli/mysqli_nonapi.c +++ b/ext/mysqli/mysqli_nonapi.c @@ -38,7 +38,7 @@ PHP_FUNCTION(mysqli_connect) zval *object = getThis(); char *hostname = NULL, *username=NULL, *passwd=NULL, *dbname=NULL, *socket=NULL; unsigned int hostname_len, username_len, passwd_len, dbname_len, socket_len; - unsigned int port=0; + long port=0; if (getThis() && !ZEND_NUM_ARGS()) { diff --git a/ext/mysqli/mysqli_report.c b/ext/mysqli/mysqli_report.c index fd3d66d424..c344fad434 100644 --- a/ext/mysqli/mysqli_report.c +++ b/ext/mysqli/mysqli_report.c @@ -31,7 +31,7 @@ sets report level */ PHP_FUNCTION(mysqli_report) { - int flags; + long flags; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &flags) == FAILURE) { diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 76cb139e00..f6b5a1977d 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -5012,7 +5012,7 @@ PHP_FUNCTION(oci_lob_write_temporary) oci_descriptor *descr; ub4 offset = 1; ub4 loblen; - int lob_type = OCI_TEMP_CLOB; + long lob_type = OCI_TEMP_CLOB; oci_debug ("oci_write_temporary_lob"); diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 3e2e8a2c5a..914ad66d65 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -1401,7 +1401,7 @@ PHP_FUNCTION(pg_fetch_result) /* }}} */ /* {{{ void php_pgsql_fetch_hash */ -static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, int result_type, int into_object) +static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, long result_type, int into_object) { zval *result; PGresult *pgsql_result; @@ -3254,12 +3254,13 @@ PHP_FUNCTION(pg_result_status) PHP_FUNCTION(pg_get_notify) { zval *pgsql_link; - int id = -1, result_type = PGSQL_ASSOC; + int id = -1; + long result_type = PGSQL_ASSOC; PGconn *pgsql; PGnotify *pgsql_notify; if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS() TSRMLS_CC, "r|l", - &pgsql_link) == FAILURE) { + &pgsql_link, &result_type) == FAILURE) { RETURN_FALSE; } diff --git a/ext/soap/soap.c b/ext/soap/soap.c index adf219072c..0cf007e0fb 100644 --- a/ext/soap/soap.c +++ b/ext/soap/soap.c @@ -967,7 +967,7 @@ PHP_FUNCTION(SoapServer,map) PHP_METHOD(soapserver,setpersistence) { soapServicePtr service; - int value; + long value; SOAP_SERVER_BEGIN_CODE(); diff --git a/ext/spl/spl_iterators.c b/ext/spl/spl_iterators.c index 594f2c49e8..a9e1d9766a 100755 --- a/ext/spl/spl_iterators.c +++ b/ext/spl/spl_iterators.c @@ -318,7 +318,7 @@ SPL_METHOD(RecursiveIteratorIterator, __construct) spl_recursive_it_object *intern; zval *iterator; zend_class_entry *ce_iterator; - int mode = RIT_LEAVES_ONLY; + long mode = RIT_LEAVES_ONLY; php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC); @@ -401,7 +401,7 @@ SPL_METHOD(RecursiveIteratorIterator, getDepth) SPL_METHOD(RecursiveIteratorIterator, getSubIterator) { spl_recursive_it_object *object = (spl_recursive_it_object*)zend_object_store_get_object(getThis() TSRMLS_CC); - int level = object->level; + long level = object->level; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|l", &level) == FAILURE) { return; diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 0753d0bbac..d923045125 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -1202,7 +1202,7 @@ PHP_FUNCTION(sqlite_popen) } /* now we need to open the database */ - php_sqlite_open(fullpath, mode, hashkey, return_value, errmsg, NULL TSRMLS_CC); + php_sqlite_open(fullpath, (int)mode, hashkey, return_value, errmsg, NULL TSRMLS_CC); efree(fullpath); efree(hashkey); @@ -1254,7 +1254,7 @@ PHP_FUNCTION(sqlite_open) } } - php_sqlite_open(fullpath ? fullpath : filename, mode, NULL, return_value, errmsg, object TSRMLS_CC); + php_sqlite_open(fullpath ? fullpath : filename, (int)mode, NULL, return_value, errmsg, object TSRMLS_CC); if (fullpath) { efree(fullpath); @@ -1294,7 +1294,7 @@ PHP_FUNCTION(sqlite_factory) } } - php_sqlite_open(filename, mode, NULL, return_value, errmsg, return_value TSRMLS_CC); + php_sqlite_open(filename, (int)mode, NULL, return_value, errmsg, return_value TSRMLS_CC); php_std_error_handling(); } @@ -1434,7 +1434,7 @@ next_row: /* }}} */ /* {{{ sqlite_query */ -void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, long mode, int buffered, zval *return_value, struct php_sqlite_result **prres TSRMLS_DC) +void sqlite_query(zval *object, struct php_sqlite_db *db, char *sql, long sql_len, int mode, int buffered, zval *return_value, struct php_sqlite_result **prres TSRMLS_DC) { struct php_sqlite_result res, *rres; int ret; @@ -1539,7 +1539,7 @@ PHP_FUNCTION(sqlite_unbuffered_query) return; } - sqlite_query(object, db, sql, sql_len, mode, 0, return_value, NULL TSRMLS_CC); + sqlite_query(object, db, sql, sql_len, (int)mode, 0, return_value, NULL TSRMLS_CC); } /* }}} */ @@ -1646,7 +1646,7 @@ PHP_FUNCTION(sqlite_query) return; } - sqlite_query(object, db, sql, sql_len, mode, 1, return_value, NULL TSRMLS_CC); + sqlite_query(object, db, sql, sql_len, (int)mode, 1, return_value, NULL TSRMLS_CC); } /* }}} */ @@ -2006,7 +2006,7 @@ PHP_FUNCTION(sqlite_array_query) } rres = (struct php_sqlite_result *)emalloc(sizeof(*rres)); - sqlite_query(NULL, db, sql, sql_len, mode, 0, NULL, &rres TSRMLS_CC); + sqlite_query(NULL, db, sql, sql_len, (int)mode, 0, NULL, &rres TSRMLS_CC); if (db->last_err_code != SQLITE_OK) { if (rres) { efree(rres); diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 077f4fdfcd..b8a8992fac 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -450,7 +450,7 @@ PHP_FUNCTION(scandir) { char *dirn; int dirn_len; - int flags = 0; + long flags = 0; php_stream_dirent **namelist; int n, i; zval *zcontext = NULL; diff --git a/ext/standard/file.c b/ext/standard/file.c index ee5e9ff9f9..f650c5fb3d 100644 --- a/ext/standard/file.c +++ b/ext/standard/file.c @@ -502,7 +502,8 @@ PHP_FUNCTION(file_put_contents) char *filename; size_t filename_len; zval *data; - int numbytes = 0, flags = 0; + int numbytes = 0; + long flags = 0; zval *zcontext = NULL; php_stream_context *context = NULL; diff --git a/ext/standard/streamsfuncs.c b/ext/standard/streamsfuncs.c index d61963004a..858638804b 100644 --- a/ext/standard/streamsfuncs.c +++ b/ext/standard/streamsfuncs.c @@ -657,7 +657,8 @@ PHP_FUNCTION(stream_select) struct timeval *tv_p = NULL; fd_set rfds, wfds, efds; int max_fd = 0; - int retval, sets = 0, usec = 0; + int retval, sets = 0; + long usec = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a!a!a!z!|l", &r_array, &w_array, &e_array, &sec, &usec) == FAILURE) return; diff --git a/ext/standard/string.c b/ext/standard/string.c index 5eed12061f..d15080c76e 100644 --- a/ext/standard/string.c +++ b/ext/standard/string.c @@ -1649,7 +1649,8 @@ PHP_FUNCTION(strripos) { zval *zneedle; char *needle, *haystack; - int needle_len, haystack_len, offset = 0; + int needle_len, haystack_len; + long offset = 0; char *p, *e, ord_needle[2]; char *needle_dup, *haystack_dup; diff --git a/ext/standard/sunfuncs.c b/ext/standard/sunfuncs.c index edcc7265f1..2eea641f4d 100644 --- a/ext/standard/sunfuncs.c +++ b/ext/standard/sunfuncs.c @@ -156,7 +156,8 @@ static void php_do_date_sunrise_sunset(INTERNAL_FUNCTION_PARAMETERS, int calc_su { zval *date; double latitude, longitude, zenith, gmt_offset, ret; - int time, N, retformat; + int time, N; + long retformat; char retstr[6]; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ldddd", &date, &retformat, &latitude, &longitude, &zenith, &gmt_offset) == FAILURE) { diff --git a/ext/standard/var.c b/ext/standard/var.c index 4f50b84411..dbd671ec29 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -741,7 +741,7 @@ PHP_FUNCTION(unserialize) 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 %ld bytes", p - Z_STRVAL_PP(buf), Z_STRLEN_PP(buf)); RETURN_FALSE; } PHP_VAR_UNSERIALIZE_DESTROY(var_hash); diff --git a/ext/w32api/w32api.c b/ext/w32api/w32api.c index 6f7fe37a83..c3ddb30f9d 100644 --- a/ext/w32api/w32api.c +++ b/ext/w32api/w32api.c @@ -1506,7 +1506,7 @@ W32API_CLASS_FUNCTION(win32, unregisterfunction) int function_name_len; w32api_func_handle **fh = NULL; - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &function_name, &function_name_len) == FAILURE) { @@ -1532,7 +1532,7 @@ W32API_CLASS_FUNCTION(win32, registercallback) int function_definition_len; w32api_func_handle **fh = NULL; - if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", + if(zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &function_definition, &function_definition_len) == FAILURE) { |