summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Hill <ddhill@php.net>2003-03-07 13:42:30 +0000
committerDavid Hill <ddhill@php.net>2003-03-07 13:42:30 +0000
commit45a1a3037a258080040b57e7f31f7e6fe2bd967e (patch)
tree0176e91b8fdd03c6ed0853522b8581e07822b73c
parentf760f7b6b3b25b5be1ba6d4f186c577298ed9a89 (diff)
downloadphp-git-45a1a3037a258080040b57e7f31f7e6fe2bd967e.tar.gz
64-bit correction to variables passed to zend_parse_parameters
@64-bit correction to variables passed to zend_parse_parameters (Dave)
-rw-r--r--ext/dio/dio.c18
-rw-r--r--ext/domxml/php_domxml.c15
-rw-r--r--ext/fdf/fdf.c9
-rw-r--r--ext/ftp/php_ftp.c30
-rw-r--r--ext/ldap/ldap.c4
-rw-r--r--ext/mcrypt/mcrypt.c2
-rw-r--r--ext/mhash/mhash.c8
-rw-r--r--ext/openssl/openssl.c55
-rw-r--r--ext/pgsql/pgsql.c25
-rw-r--r--ext/posix/posix.c3
-rw-r--r--ext/sockets/sockets.c57
-rw-r--r--ext/standard/exec.c2
-rw-r--r--ext/standard/file.c3
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/head.c2
-rw-r--r--ext/standard/html.c5
-rw-r--r--ext/standard/metaphone.c3
-rw-r--r--ext/standard/string.c5
-rw-r--r--ext/sysvsem/sysvsem.c2
-rw-r--r--ext/zip/zip.c2
-rw-r--r--ext/zlib/zlib.c2
-rw-r--r--main/output.c2
22 files changed, 149 insertions, 107 deletions
diff --git a/ext/dio/dio.c b/ext/dio/dio.c
index 0aff89767b..6b91b16011 100644
--- a/ext/dio/dio.c
+++ b/ext/dio/dio.c
@@ -146,8 +146,8 @@ PHP_FUNCTION(dio_open)
php_fd_t *f;
char *file_name;
int file_name_length;
- int flags;
- mode_t mode = 0;
+ long flags;
+ long mode = 0;
int fd;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &file_name, &file_name_length, &flags, &mode) == FAILURE) {
@@ -178,7 +178,7 @@ PHP_FUNCTION(dio_read)
zval *r_fd;
php_fd_t *f;
char *data;
- int bytes = 1024;
+ long bytes = 1024;
ssize_t res;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &r_fd, &bytes) == FAILURE) {
@@ -207,8 +207,8 @@ PHP_FUNCTION(dio_write)
zval *r_fd;
php_fd_t *f;
char *data;
- size_t data_len;
- size_t trunc_len = 0;
+ int data_len;
+ long trunc_len = 0;
ssize_t res;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &r_fd, &data, &data_len, &trunc_len) == FAILURE) {
@@ -232,7 +232,7 @@ PHP_FUNCTION(dio_truncate)
{
zval *r_fd;
php_fd_t *f;
- off_t offset;
+ long offset;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &r_fd, &offset) == FAILURE) {
return;
@@ -293,8 +293,8 @@ PHP_FUNCTION(dio_seek)
{
zval *r_fd;
php_fd_t *f;
- off_t offset;
- int whence = SEEK_SET;
+ long offset;
+ long whence = SEEK_SET;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &r_fd, &offset, &whence) == FAILURE) {
return;
@@ -312,7 +312,7 @@ PHP_FUNCTION(dio_fcntl)
zval *r_fd;
zval *arg = NULL;
php_fd_t *f;
- int cmd;
+ long cmd;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|z", &r_fd, &cmd, &arg) == FAILURE) {
return;
diff --git a/ext/domxml/php_domxml.c b/ext/domxml/php_domxml.c
index 35ea98d739..31e2c259f2 100644
--- a/ext/domxml/php_domxml.c
+++ b/ext/domxml/php_domxml.c
@@ -1967,7 +1967,8 @@ PHP_FUNCTION(domxml_clone_node)
zval *rv = NULL;
zval *id;
xmlNode *n, *node;
- int ret, recursive = 0;;
+ int ret;
+ long recursive = 0;
DOMXML_GET_THIS_OBJ(n, id, le_domxmlnodep);
@@ -3558,7 +3559,8 @@ PHP_FUNCTION(domxml_doc_imported_node)
zval *arg1, *id, *rv = NULL;
xmlNodePtr node, srcnode;
xmlDocPtr docp;
- int ret, recursive = 0;
+ int ret;
+ long recursive = 0;
DOMXML_GET_THIS_OBJ(docp, id, le_domxmldocp);
@@ -3764,7 +3766,8 @@ PHP_FUNCTION(xmldoc)
int ret;
char *buffer;
int buffer_len;
- int mode = 0, prevSubstValue;
+ long mode = 0;
+ int prevSubstValue;
int oldvalue = xmlDoValidityCheckingDefaultValue;
int oldvalue_keepblanks;
int prevLoadExtDtdValue = xmlLoadExtDtdDefaultValue;
@@ -3850,7 +3853,8 @@ PHP_FUNCTION(xmldocfile)
xmlDoc *docp = NULL;
int ret, file_len;
char *file;
- int mode = 0, prevSubstValue;
+ long mode = 0;
+ int prevSubstValue;
int oldvalue = xmlDoValidityCheckingDefaultValue;
int oldvalue_keepblanks;
zval *errors = NULL;
@@ -5211,7 +5215,8 @@ PHP_FUNCTION(domxml_xslt_result_dump_file)
xmlDocPtr xmldocp;
char *filename;
int filename_len;
- int ret, compression = 0;
+ int ret;
+ long compression = 0;
DOMXML_GET_THIS(idxsl);
diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c
index e6060e6626..130d2b933a 100644
--- a/ext/fdf/fdf.c
+++ b/ext/fdf/fdf.c
@@ -554,7 +554,8 @@ PHP_FUNCTION(fdf_set_ap)
PHP_FUNCTION(fdf_get_ap) {
zval *r_fdf;
char *fieldname, *filename;
- int fieldname_len, filename_len, face;
+ int fieldname_len, filename_len;
+ long face;
FDFDoc fdf;
FDFErc err;
FDFAppFace facenr;
@@ -941,7 +942,8 @@ PHP_FUNCTION(fdf_set_flags)
PHP_FUNCTION(fdf_get_flags) {
zval *r_fdf;
char *fieldname;
- int fieldname_len, whichflags;
+ int fieldname_len;
+ long whichflags;
FDFDoc fdf;
FDFErc err;
ASUns32 flags;
@@ -997,7 +999,8 @@ PHP_FUNCTION(fdf_set_opt)
PHP_FUNCTION(fdf_get_opt) {
zval *r_fdf;
char *fieldname;
- int fieldname_len, element = -1;
+ int fieldname_len;
+ long element = -1;
FDFDoc fdf;
FDFErc err;
diff --git a/ext/ftp/php_ftp.c b/ext/ftp/php_ftp.c
index 17ca7b16ef..c0bf79e0f8 100644
--- a/ext/ftp/php_ftp.c
+++ b/ext/ftp/php_ftp.c
@@ -145,7 +145,8 @@ PHP_FUNCTION(ftp_connect)
{
ftpbuf_t *ftp;
char *host;
- int host_len, port = 0;
+ int host_len;
+ long port = 0;
long timeout_sec = FTP_DEFAULT_TIMEOUT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &host, &host_len, &port, &timeout_sec) == FAILURE) {
@@ -181,7 +182,8 @@ PHP_FUNCTION(ftp_ssl_connect)
{
ftpbuf_t *ftp;
char *host;
- int host_len, port = 0;
+ int host_len;
+ long port = 0;
long timeout_sec = FTP_DEFAULT_TIMEOUT;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &host, &host_len, &port, &timeout_sec) == FAILURE) {
@@ -467,7 +469,8 @@ PHP_FUNCTION(ftp_fget)
ftptype_t xtype;
php_stream *stream;
char *file;
- int file_len, mode, resumepos=0;
+ int file_len;
+ long mode, resumepos=0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrsl|l", &z_ftp, &z_file, &file, &file_len, &mode, &resumepos) == FAILURE) {
return;
@@ -510,7 +513,8 @@ PHP_FUNCTION(ftp_nb_fget)
ftptype_t xtype;
php_stream *stream;
char *file;
- int file_len, mode, resumepos=0, ret;
+ int file_len, ret;
+ long mode, resumepos=0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrsl|l", &z_ftp, &z_file, &file, &file_len, &mode, &resumepos) == FAILURE) {
return;
@@ -579,7 +583,8 @@ PHP_FUNCTION(ftp_get)
ftptype_t xtype;
php_stream *outstream;
char *local, *remote;
- int local_len, remote_len, mode, resumepos=0;
+ int local_len, remote_len;
+ long mode, resumepos=0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssl|l", &z_ftp, &local, &local_len, &remote, &remote_len, &mode, &resumepos) == FAILURE) {
return;
@@ -636,7 +641,8 @@ PHP_FUNCTION(ftp_nb_get)
ftptype_t xtype;
php_stream *outstream;
char *local, *remote;
- int local_len, remote_len, mode, resumepos=0, ret;
+ int local_len, remote_len, ret;
+ long mode, resumepos=0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssl|l", &z_ftp, &local, &local_len, &remote, &remote_len, &mode, &resumepos) == FAILURE) {
return;
@@ -735,7 +741,8 @@ PHP_FUNCTION(ftp_fput)
zval *z_ftp, *z_file;
ftpbuf_t *ftp;
ftptype_t xtype;
- int mode, remote_len, startpos=0;
+ int remote_len;
+ long mode, startpos=0;
php_stream *stream;
char *remote;
@@ -781,7 +788,8 @@ PHP_FUNCTION(ftp_nb_fput)
zval *z_ftp, *z_file;
ftpbuf_t *ftp;
ftptype_t xtype;
- int mode, remote_len, startpos=0, ret;
+ int remote_len, ret;
+ long mode, startpos=0;
php_stream *stream;
char *remote;
@@ -833,7 +841,8 @@ PHP_FUNCTION(ftp_put)
ftpbuf_t *ftp;
ftptype_t xtype;
char *remote, *local;
- int remote_len, local_len, mode, startpos=0;
+ int remote_len, local_len;
+ long mode, startpos=0;
php_stream * instream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssl|l", &z_ftp, &remote, &remote_len, &local, &local_len, &mode, &startpos) == FAILURE) {
@@ -887,7 +896,8 @@ PHP_FUNCTION(ftp_nb_put)
ftpbuf_t *ftp;
ftptype_t xtype;
char *remote, *local;
- int remote_len, local_len, mode, startpos=0, ret;
+ int remote_len, local_len, ret;
+ int mode, startpos=0;
php_stream * instream;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rssl|l", &z_ftp, &remote, &remote_len, &local, &local_len, &mode, &startpos) == FAILURE) {
diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c
index 7fd92bbf4f..724733112a 100644
--- a/ext/ldap/ldap.c
+++ b/ext/ldap/ldap.c
@@ -345,11 +345,11 @@ PHP_FUNCTION(ldap_connect)
{
char *host = NULL;
int hostlen;
- int port = 389; /* Default port */
+ long port = 389; /* Default port */
#ifdef HAVE_ORALDAP
char *wallet, *walletpasswd;
int walletlen, walletpasswdlen;
- int authmode;
+ long authmode;
int ssl=0;
#endif
ldap_linkdata *ld;
diff --git a/ext/mcrypt/mcrypt.c b/ext/mcrypt/mcrypt.c
index 9b19c691a0..f7a7ab6ba5 100644
--- a/ext/mcrypt/mcrypt.c
+++ b/ext/mcrypt/mcrypt.c
@@ -1435,7 +1435,7 @@ PHP_FUNCTION(mcrypt_ofb)
PHP_FUNCTION(mcrypt_create_iv)
{
char *iv;
- iv_source source = RANDOM;
+ long source = RANDOM;
long size;
int n = 0;
diff --git a/ext/mhash/mhash.c b/ext/mhash/mhash.c
index a164a5c46d..12b135b5e4 100644
--- a/ext/mhash/mhash.c
+++ b/ext/mhash/mhash.c
@@ -107,7 +107,7 @@ PHP_FUNCTION(mhash_count)
Gets the block size of hash */
PHP_FUNCTION(mhash_get_block_size)
{
- int hash;
+ long hash;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &hash) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -123,7 +123,7 @@ PHP_FUNCTION(mhash_get_block_size)
PHP_FUNCTION(mhash_get_hash_name)
{
char *name;
- int hash;
+ long hash;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &hash) == FAILURE) {
WRONG_PARAM_COUNT;
@@ -147,7 +147,7 @@ PHP_FUNCTION(mhash)
MHASH td;
int bsize;
unsigned char *hash_data;
- int hash;
+ long hash;
int data_len, key_len=0;
char *data, *key=NULL;
@@ -196,7 +196,7 @@ PHP_FUNCTION(mhash_keygen_s2k)
{
KEYGEN keystruct;
char salt[SALT_SIZE], *ret;
- int hash, bytes;
+ long hash, bytes;
char *password, *in_salt;
int password_len, salt_len;
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c
index 3b3ac2e088..cabe01fa20 100644
--- a/ext/openssl/openssl.c
+++ b/ext/openssl/openssl.c
@@ -712,7 +712,7 @@ PHP_FUNCTION(openssl_x509_export_to_file)
BIO * bio_out;
long certresource;
char * filename;
- long filename_len;
+ int filename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|b", &zcert, &filename, &filename_len, &notext) == FAILURE)
return;
@@ -1000,7 +1000,7 @@ PHP_FUNCTION(openssl_x509_checkpurpose)
STACK_OF(X509) * untrustedchain = NULL;
long purpose;
char * untrusted = NULL;
- long untrusted_len;
+ int untrusted_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "zl|a!s", &zcert, &purpose, &zcainfo, &untrusted, &untrusted_len)
== FAILURE)
@@ -1339,7 +1339,7 @@ PHP_FUNCTION(openssl_csr_export_to_file)
X509_REQ * csr;
zval * zcsr = NULL;
zend_bool notext = 1;
- char * filename = NULL; long filename_len;
+ char * filename = NULL; int filename_len;
BIO * bio_out;
long csr_resource;
@@ -1878,8 +1878,8 @@ PHP_FUNCTION(openssl_pkey_export_to_file)
{
struct php_x509_request req;
zval * zpkey, * args = NULL;
- char * passphrase = NULL; long passphrase_len = 0;
- char * filename = NULL; long filename_len = 0;
+ char * passphrase = NULL; int passphrase_len = 0;
+ char * filename = NULL; int filename_len = 0;
long key_resource = -1;
EVP_PKEY * key;
BIO * bio_out = NULL;
@@ -1934,7 +1934,7 @@ PHP_FUNCTION(openssl_pkey_export)
{
struct php_x509_request req;
zval * zpkey, * args = NULL, *out;
- char * passphrase = NULL; long passphrase_len = 0;
+ char * passphrase = NULL; int passphrase_len = 0;
long key_resource = -1;
EVP_PKEY * key;
BIO * bio_out = NULL;
@@ -2026,7 +2026,7 @@ PHP_FUNCTION(openssl_pkey_get_private)
zval *cert;
EVP_PKEY *pkey;
char * passphrase = "";
- long passphrase_len;
+ int passphrase_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|s", &cert, &passphrase, &passphrase_len) == FAILURE)
return;
@@ -2056,9 +2056,9 @@ PHP_FUNCTION(openssl_pkcs7_verify)
PKCS7 * p7 = NULL;
BIO * in = NULL, * datain = NULL;
long flags = 0;
- char * filename; long filename_len;
- char * extracerts = NULL; long extracerts_len;
- char * signersfilename = NULL; long signersfilename_len;
+ char * filename; int filename_len;
+ char * extracerts = NULL; int extracerts_len;
+ char * signersfilename = NULL; int signersfilename_len;
RETVAL_LONG(-1);
@@ -2155,8 +2155,8 @@ PHP_FUNCTION(openssl_pkcs7_encrypt)
uint strindexlen;
ulong intindex;
char * strindex;
- char * infilename = NULL; long infilename_len;
- char * outfilename = NULL; long outfilename_len;
+ char * infilename = NULL; int infilename_len;
+ char * outfilename = NULL; int outfilename_len;
RETVAL_FALSE;
@@ -2281,9 +2281,9 @@ PHP_FUNCTION(openssl_pkcs7_sign)
uint strindexlen;
HashPosition hpos;
char * strindex;
- char * infilename; long infilename_len;
- char * outfilename; long outfilename_len;
- char * extracertsfilename = NULL; long extracertsfilename_len;
+ char * infilename; int infilename_len;
+ char * outfilename; int outfilename_len;
+ char * extracertsfilename = NULL; int extracertsfilename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sszza!|ls",
&infilename, &infilename_len, &outfilename, &outfilename_len,
@@ -2381,8 +2381,8 @@ PHP_FUNCTION(openssl_pkcs7_decrypt)
long certresval, keyresval;
BIO * in = NULL, * out = NULL, * datain = NULL;
PKCS7 * p7 = NULL;
- char * infilename; long infilename_len;
- char * outfilename; long outfilename_len;
+ char * infilename; int infilename_len;
+ char * outfilename; int outfilename_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssz|z", &infilename, &infilename_len,
&outfilename, &outfilename_len, &recipcert, &recipkey) == FAILURE)
@@ -2448,7 +2448,8 @@ PHP_FUNCTION(openssl_private_encrypt)
int successful = 0;
long keyresource = -1;
char * data;
- long data_len, padding = RSA_PKCS1_PADDING;
+ int data_len;
+ long padding = RSA_PKCS1_PADDING;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE)
return;
@@ -2505,7 +2506,7 @@ PHP_FUNCTION(openssl_private_decrypt)
long padding = RSA_PKCS1_PADDING;
long keyresource = -1;
char * data;
- long data_len;
+ int data_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE)
return;
@@ -2568,7 +2569,7 @@ PHP_FUNCTION(openssl_public_encrypt)
long keyresource = -1;
long padding = RSA_PKCS1_PADDING;
char * data;
- long data_len;
+ int data_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE)
return;
@@ -2625,7 +2626,7 @@ PHP_FUNCTION(openssl_public_decrypt)
long keyresource = -1;
long padding = RSA_PKCS1_PADDING;
char * data;
- long data_len;
+ int data_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz|l", &data, &data_len, &crypted, &key, &padding) == FAILURE)
return;
@@ -2710,7 +2711,7 @@ PHP_FUNCTION(openssl_sign)
int siglen;
unsigned char *sigbuf;
long keyresource = -1;
- char * data; long data_len;
+ char * data; int data_len;
EVP_MD_CTX md_ctx;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szz", &data, &data_len, &signature, &key) == FAILURE)
@@ -2750,8 +2751,8 @@ PHP_FUNCTION(openssl_verify)
int err;
EVP_MD_CTX md_ctx;
long keyresource = -1;
- char * data; long data_len;
- char * signature; long signature_len;
+ char * data; int data_len;
+ char * signature; int signature_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssz", &data, &data_len,
&signature, &signature_len, &key) == FAILURE)
@@ -2785,7 +2786,7 @@ PHP_FUNCTION(openssl_seal)
long * key_resources; /* so we know what to cleanup */
int i, len1, len2, *eksl, nkeys;
unsigned char *buf = NULL, **eks;
- char * data; long data_len;
+ char * data; int data_len;
EVP_CIPHER_CTX ctx;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szza/",
@@ -2913,8 +2914,8 @@ PHP_FUNCTION(openssl_open)
unsigned char *buf;
long keyresource = -1;
EVP_CIPHER_CTX ctx;
- char * data; long data_len;
- char * ekey; long ekey_len;
+ char * data; int data_len;
+ char * ekey; int ekey_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "szsz", &data, &data_len,
&opendata, &ekey, &ekey_len, &privkey) == FAILURE)
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 67bf55eb10..48721582f8 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -1439,7 +1439,7 @@ PHP_FUNCTION(pg_fetch_all)
PHP_FUNCTION(pg_result_seek)
{
zval *result;
- int row;
+ long row;
pgsql_result_handle *pg_result;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &result, &row) == FAILURE) {
@@ -2190,7 +2190,7 @@ PHP_FUNCTION(pg_lo_export)
PHP_FUNCTION(pg_lo_seek)
{
zval *pgsql_id = NULL;
- int offset = 0, whence = SEEK_CUR;
+ long offset = 0, whence = SEEK_CUR;
pgLofp *pgsql;
int argc = ZEND_NUM_ARGS();
@@ -2601,7 +2601,8 @@ PHP_FUNCTION(pg_copy_from)
PHP_FUNCTION(pg_escape_string)
{
char *from = NULL, *to = NULL;
- size_t from_len, to_len;
+ size_t to_len;
+ long from_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
&from, &from_len) == FAILURE) {
return;
@@ -2618,7 +2619,8 @@ PHP_FUNCTION(pg_escape_string)
PHP_FUNCTION(pg_escape_bytea)
{
char *from = NULL, *to = NULL;
- size_t from_len, to_len;
+ size_t to_len;
+ long from_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
&from, &from_len) == FAILURE) {
return;
@@ -2741,7 +2743,8 @@ static unsigned char * php_pgsql_unescape_bytea(unsigned char *strtext, size_t *
PHP_FUNCTION(pg_unescape_bytea)
{
char *from = NULL, *to = NULL;
- size_t from_len, to_len;
+ size_t to_len;
+ long from_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
&from, &from_len) == FAILURE) {
return;
@@ -3917,7 +3920,7 @@ PHP_FUNCTION(pg_convert)
{
zval *pgsql_link, *values;
char *table_name;
- size_t table_name_len;
+ int table_name_len;
ulong option = 0;
PGconn *pg_link;
int id = -1;
@@ -4076,7 +4079,7 @@ PHP_FUNCTION(pg_insert)
{
zval *pgsql_link, *values;
char *table, *sql = NULL;
- ulong table_len;
+ int table_len;
ulong option = PGSQL_DML_EXEC;
PGconn *pg_link;
int id = -1, argc = ZEND_NUM_ARGS();
@@ -4225,7 +4228,7 @@ PHP_FUNCTION(pg_update)
{
zval *pgsql_link, *values, *ids;
char *table, *sql = NULL;
- ulong table_len;
+ int table_len;
ulong option = PGSQL_DML_EXEC;
PGconn *pg_link;
int id = -1, argc = ZEND_NUM_ARGS();
@@ -4314,7 +4317,8 @@ PHP_FUNCTION(pg_delete)
{
zval *pgsql_link, *ids;
char *table, *sql = NULL;
- ulong table_len, option = PGSQL_DML_EXEC;
+ int table_len;
+ ulong option = PGSQL_DML_EXEC;
PGconn *pg_link;
int id = -1, argc = ZEND_NUM_ARGS();
@@ -4451,7 +4455,8 @@ PHP_FUNCTION(pg_select)
{
zval *pgsql_link, *ids;
char *table, *sql = NULL;
- ulong table_len, option = PGSQL_DML_EXEC;
+ int table_len;
+ ulong option = PGSQL_DML_EXEC;
PGconn *pg_link;
int id = -1, argc = ZEND_NUM_ARGS();
diff --git a/ext/posix/posix.c b/ext/posix/posix.c
index 13648b4fee..e9c561392c 100644
--- a/ext/posix/posix.c
+++ b/ext/posix/posix.c
@@ -702,7 +702,8 @@ PHP_FUNCTION(posix_getcwd)
PHP_FUNCTION(posix_mkfifo)
{
char *path;
- long path_len, mode;
+ int path_len;
+ long mode;
int result;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &path, &path_len, &mode) == FAILURE)
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index 04f5b619a8..f7e3e8148d 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -555,7 +555,8 @@ PHP_FUNCTION(socket_select)
struct timeval *tv_p = NULL;
fd_set rfds, wfds, efds;
SOCKET 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;
@@ -602,7 +603,7 @@ PHP_FUNCTION(socket_select)
PHP_FUNCTION(socket_create_listen)
{
php_socket *php_sock;
- int port, backlog = 128;
+ long port, backlog = 128;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|l", &port, &backlog) == FAILURE)
return;
@@ -702,7 +703,7 @@ PHP_FUNCTION(socket_listen)
{
zval *arg1;
php_socket *php_sock;
- int backlog = 0;
+ long backlog = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &arg1, &backlog) == FAILURE)
return;
@@ -739,7 +740,8 @@ PHP_FUNCTION(socket_write)
{
zval *arg1;
php_socket *php_sock;
- int retval, str_len, length;
+ int retval, str_len;
+ long length;
char *str;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &arg1, &str, &str_len, &length) == FAILURE)
@@ -773,7 +775,8 @@ PHP_FUNCTION(socket_read)
zval *arg1;
php_socket *php_sock;
char *tmpbuf;
- int retval, length, type = PHP_BINARY_READ;
+ int retval;
+ long length, type = PHP_BINARY_READ;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl|l", &arg1, &length, &type) == FAILURE)
return;
@@ -920,7 +923,7 @@ PHP_FUNCTION(socket_getpeername)
Creates an endpoint for communication in the domain specified by domain, of type specified by type */
PHP_FUNCTION(socket_create)
{
- int arg1, arg2, arg3;
+ long arg1, arg2, arg3;
php_socket *php_sock = (php_socket*)emalloc(sizeof(php_socket));
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lll", &arg1, &arg2, &arg3) == FAILURE) {
@@ -962,7 +965,8 @@ PHP_FUNCTION(socket_connect)
struct sockaddr_in sin;
struct sockaddr_un s_un;
char *addr;
- int retval, addr_len, port;
+ int retval, addr_len;
+ long port;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &arg1, &addr, &addr_len, &port) == FAILURE)
return;
@@ -1012,7 +1016,7 @@ PHP_FUNCTION(socket_connect)
Returns a string describing an error */
PHP_FUNCTION(socket_strerror)
{
- int arg1;
+ long arg1;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &arg1) == FAILURE)
return;
@@ -1030,7 +1034,8 @@ PHP_FUNCTION(socket_bind)
struct sockaddr *sock_type = (struct sockaddr*) &sa_storage;
php_socket *php_sock;
char *addr;
- int addr_len, port = 0;
+ int addr_len;
+ int port = 0;
long retval = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rs|l", &arg1, &addr, &addr_len, &port) == FAILURE)
@@ -1127,7 +1132,7 @@ PHP_FUNCTION(socket_iovec_fetch)
{
zval *iovec_id;
php_iovec_t *vector;
- unsigned int iovec_position;
+ unsigned long iovec_position;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iovec_position) == FAILURE)
return;
@@ -1150,7 +1155,7 @@ PHP_FUNCTION(socket_iovec_set)
zval *iovec_id;
php_iovec_t *vector;
int new_val_len;
- unsigned int iovec_position;
+ unsigned long iovec_position;
char *new_val;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rls", &iovec_id, &iovec_position, &new_val, &new_val_len) == FAILURE)
@@ -1181,7 +1186,7 @@ PHP_FUNCTION(socket_iovec_add)
zval *iovec_id;
php_iovec_t *vector;
struct iovec *vector_array;
- int iov_len;
+ long iov_len;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iov_len) == FAILURE)
return;
@@ -1209,7 +1214,8 @@ PHP_FUNCTION(socket_iovec_delete)
zval *iovec_id;
php_iovec_t *vector;
struct iovec *vector_array;
- unsigned int i, iov_pos;
+ unsigned int i;
+ unsigned long iov_pos;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iov_pos) == FAILURE)
return;
@@ -1309,7 +1315,8 @@ PHP_FUNCTION(socket_recv)
zval *php_sock_res, *buf;
char *recv_buf;
php_socket *php_sock;
- int retval, len, flags;
+ int retval;
+ long len, flags;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzll", &php_sock_res, &buf, &len, &flags) == FAILURE)
return;
@@ -1350,7 +1357,8 @@ PHP_FUNCTION(socket_send)
{
zval *arg1;
php_socket *php_sock;
- int buf_len, len, flags, retval;
+ int buf_len, retval;
+ long len, flags;
char *buf;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rsll", &arg1, &buf, &buf_len, &len, &flags) == FAILURE)
@@ -1378,7 +1386,8 @@ PHP_FUNCTION(socket_recvfrom)
struct sockaddr_un s_un;
struct sockaddr_in sin;
socklen_t slen;
- int retval, arg3, arg4;
+ int retval;
+ long arg3, arg4;
char *recv_buf, *address;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rzllz|z", &arg1, &arg2, &arg3, &arg4, &arg5, &arg6) == FAILURE)
@@ -1454,7 +1463,8 @@ PHP_FUNCTION(socket_sendto)
php_socket *php_sock;
struct sockaddr_un s_un;
struct sockaddr_in sin;
- int retval, buf_len, len, flags, addr_len, port = 0;
+ int retval, buf_len, addr_len;
+ long len, flags, port = 0;
char *buf, *addr;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rslls|l", &arg1, &buf, &buf_len, &len, &flags, &addr, &addr_len, &port) == FAILURE)
@@ -1662,7 +1672,8 @@ PHP_FUNCTION(socket_sendmsg)
struct sockaddr sa;
char *addr;
socklen_t salen;
- int flags, addr_len, port;
+ int addr_len;
+ long flags, port;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rrls|l", &arg1, &arg2, &flags, &addr, &addr_len, &port) == FAILURE)
return;
@@ -1747,7 +1758,8 @@ PHP_FUNCTION(socket_get_option)
struct timeval tv;
socklen_t optlen;
php_socket *php_sock;
- int other_val, level, optname;
+ int other_val;
+ long level, optname;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rll", &arg1, &level, &optname) == FAILURE)
return;
@@ -1810,7 +1822,8 @@ PHP_FUNCTION(socket_set_option)
struct linger lv;
struct timeval tv;
php_socket *php_sock;
- int ov, optlen, retval, level, optname;
+ int ov, optlen, retval;
+ long level, optname;
void *opt_ptr;
HashTable *opt_ht;
@@ -1902,7 +1915,7 @@ PHP_FUNCTION(socket_create_pair)
zval *retval[2], *fds_array_zval;
php_socket *php_sock[2];
SOCKET fds_array[2];
- int domain, type, protocol;
+ long domain, type, protocol;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "lllz", &domain, &type, &protocol, &fds_array_zval) == FAILURE)
return;
@@ -1959,7 +1972,7 @@ PHP_FUNCTION(socket_create_pair)
PHP_FUNCTION(socket_shutdown)
{
zval *arg1;
- int how_shutdown = 2;
+ long how_shutdown = 2;
php_socket *php_sock;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &arg1, &how_shutdown) == FAILURE)
diff --git a/ext/standard/exec.c b/ext/standard/exec.c
index f6b942e701..e90b2fb4fd 100644
--- a/ext/standard/exec.c
+++ b/ext/standard/exec.c
@@ -671,7 +671,7 @@ PHP_FUNCTION(proc_open)
#define MAX_DESCRIPTORS 16
char *command;
- long command_len;
+ int command_len;
zval *descriptorspec;
zval *pipes;
int ndesc = 0;
diff --git a/ext/standard/file.c b/ext/standard/file.c
index b79d5e2eed..4f93940c97 100644
--- a/ext/standard/file.c
+++ b/ext/standard/file.c
@@ -770,7 +770,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/fsock.c b/ext/standard/fsock.c
index d1f37a46dc..c73ff481b5 100644
--- a/ext/standard/fsock.c
+++ b/ext/standard/fsock.c
@@ -136,7 +136,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
{
char *host;
int host_len;
- int port = -1;
+ long port = -1;
zval *zerrno = NULL, *zerrstr = NULL;
double timeout = FG(default_socket_timeout);
unsigned long conv;
diff --git a/ext/standard/head.c b/ext/standard/head.c
index 234468d5ed..c993664269 100644
--- a/ext/standard/head.c
+++ b/ext/standard/head.c
@@ -142,7 +142,7 @@ PHPAPI int php_setcookie(char *name, int name_len, char *value, int value_len, t
PHP_FUNCTION(setcookie)
{
char *name, *value = NULL, *path = NULL, *domain = NULL;
- time_t expires = 0;
+ long expires = 0;
zend_bool secure = 0;
int name_len, value_len, path_len, domain_len;
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 793b18f661..8080698055 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -872,7 +872,8 @@ PHP_FUNCTION(htmlspecialchars)
PHP_FUNCTION(html_entity_decode)
{
char *str, *hint_charset = NULL;
- int str_len, hint_charset_len, len, quote_style = ENT_COMPAT;
+ int str_len, hint_charset_len, len;
+ long quote_style = ENT_COMPAT;
char *replaced;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ls", &str, &str_len,
@@ -898,7 +899,7 @@ PHP_FUNCTION(htmlentities)
Returns the internal translation table used by htmlspecialchars and htmlentities */
PHP_FUNCTION(get_html_translation_table)
{
- int which = HTML_SPECIALCHARS, quote_style = ENT_COMPAT;
+ long which = HTML_SPECIALCHARS, quote_style = ENT_COMPAT;
int i, j;
char ind[2];
enum entity_charset charset = determine_charset(NULL TSRMLS_CC);
diff --git a/ext/standard/metaphone.c b/ext/standard/metaphone.c
index e6cc2cf67f..c160a6a031 100644
--- a/ext/standard/metaphone.c
+++ b/ext/standard/metaphone.c
@@ -35,7 +35,8 @@ PHP_FUNCTION(metaphone)
{
char *str;
char *result = 0;
- int phones = 0, str_len;
+ int str_len;
+ long phones = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &str, &str_len,
&phones) == FAILURE) {
diff --git a/ext/standard/string.c b/ext/standard/string.c
index d4c31fe250..db6ca361ff 100644
--- a/ext/standard/string.c
+++ b/ext/standard/string.c
@@ -202,7 +202,8 @@ PHP_FUNCTION(bin2hex)
static void php_spn_common_handler(INTERNAL_FUNCTION_PARAMETERS, int behavior)
{
char *s11, *s22;
- int len1, len2, start, len;
+ int len1, len2;
+ long start, len;
start = 0;
len = 0;
@@ -1219,7 +1220,7 @@ PHP_FUNCTION(pathinfo)
zval *tmp;
char *path, *ret = NULL;
int path_len;
- int opt = PHP_PATHINFO_ALL;
+ long opt = PHP_PATHINFO_ALL;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &path, &path_len, &opt) == FAILURE) {
return;
diff --git a/ext/sysvsem/sysvsem.c b/ext/sysvsem/sysvsem.c
index ccbc1679b5..55c502d132 100644
--- a/ext/sysvsem/sysvsem.c
+++ b/ext/sysvsem/sysvsem.c
@@ -161,7 +161,7 @@ PHP_MINIT_FUNCTION(sysvsem)
Return an id for the semaphore with the given key, and allow max_acquire (default 1) processes to acquire it simultaneously */
PHP_FUNCTION(sem_get)
{
- int key, max_acquire, perm, auto_release = 1;
+ long key, max_acquire, perm, auto_release = 1;
int semid;
struct sembuf sop[3];
int count;
diff --git a/ext/zip/zip.c b/ext/zip/zip.c
index df36225471..0ff681f2aa 100644
--- a/ext/zip/zip.c
+++ b/ext/zip/zip.c
@@ -285,7 +285,7 @@ PHP_FUNCTION(zip_entry_read)
zval *zzip_ent;
php_zzip_dirent *entry = NULL;
char *buf = NULL;
- int len = 1024;
+ long len = 1024;
int ret = 0;
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "r|l", &zzip_ent, &len) == FAILURE) {
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index 207a3d9af4..ac59b2c90d 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -811,7 +811,7 @@ PHP_FUNCTION(gzencode)
{
char *data, *s2;
int data_len;
- int level = Z_DEFAULT_COMPRESSION, coding = CODING_GZIP;
+ long level = Z_DEFAULT_COMPRESSION, coding = CODING_GZIP;
int status;
z_stream stream;
diff --git a/main/output.c b/main/output.c
index 044804dbb2..c1e3364196 100644
--- a/main/output.c
+++ b/main/output.c
@@ -715,7 +715,7 @@ static int php_ub_body_write(const char *str, uint str_length TSRMLS_DC)
PHP_FUNCTION(ob_start)
{
zval *output_handler=NULL;
- uint chunk_size=0;
+ long chunk_size=0;
zend_bool erase=1;
int argc = ZEND_NUM_ARGS();