]> granicus.if.org Git - php/commitdiff
64-bit bugsquash party
authorArd Biesheuvel <abies@php.net>
Wed, 16 Jun 2004 23:57:25 +0000 (23:57 +0000)
committerArd Biesheuvel <abies@php.net>
Wed, 16 Jun 2004 23:57:25 +0000 (23:57 +0000)
12 files changed:
ext/com_dotnet/com_com.c
ext/com_dotnet/com_dotnet.c
ext/com_dotnet/com_persist.c
ext/com_dotnet/com_variant.c
ext/com_dotnet/php_com_dotnet_internal.h
ext/spl/spl_directory.c
ext/sqlite/sqlite.c
ext/standard/dir.c
ext/standard/file.c
ext/standard/fsock.c
ext/standard/proc_open.c
ext/standard/streamsfuncs.c

index 166dd079948a89a4953b165f6da2ade9e65fb213..39c90eae1f811704d28ce67d66909f7a4dab2106 100644 (file)
@@ -37,7 +37,7 @@ PHP_FUNCTION(com_create_instance)
        php_com_dotnet_object *obj;
        char *module_name, *typelib_name = NULL, *server_name = NULL;
        char *user_name = NULL, *domain_name = NULL, *password = NULL;
-       long module_name_len, typelib_name_len, server_name_len,
+       int module_name_len, typelib_name_len, server_name_len,
                user_name_len, domain_name_len, password_len;
        OLECHAR *moniker;
        CLSID clsid;
@@ -287,7 +287,7 @@ PHP_FUNCTION(com_get_active_object)
 {
        CLSID clsid;
        char *module_name;
-       long module_name_len;
+       int module_name_len;
        long code_page = COMG(code_page);
        IUnknown *unk = NULL;
        IDispatch *obj = NULL;
@@ -799,7 +799,7 @@ PHP_FUNCTION(com_message_pump)
 PHP_FUNCTION(com_load_typelib)
 {
        char *name;
-       long namelen;
+       int namelen;
        ITypeLib *pTL = NULL;
        zend_bool cs = TRUE;
        int codepage = COMG(code_page);
index 84137cfd874190632dcbda88a94e9111cc00f5af..7199b91aa72864eda55469a9aa4b8cd44b1c7b91 100644 (file)
@@ -98,7 +98,7 @@ PHP_FUNCTION(com_dotnet_create_instance)
        zval *object = getThis();
        php_com_dotnet_object *obj;
        char *assembly_name, *datatype_name;
-       long assembly_name_len, datatype_name_len;
+       int assembly_name_len, datatype_name_len;
        struct dotnet_runtime_stuff *stuff;
        IObjectHandle *handle;
        DISPPARAMS params;
index 12a7e32a4af63cfe814fdde143fe9d84e51b0ae8..d9ba2aa350484932cc215413cbb6b15aa02d7abd 100755 (executable)
@@ -375,7 +375,7 @@ CPH_METHOD(SaveToFile)
 {
        HRESULT res;
        char *filename, *fullpath = NULL;
-       long filename_len;
+       int filename_len;
        zend_bool remember = TRUE;
        OLECHAR *olefilename = NULL;
        CPH_FETCH();
@@ -438,7 +438,7 @@ CPH_METHOD(LoadFromFile)
 {
        HRESULT res;
        char *filename, *fullpath;
-       long filename_len;
+       int filename_len;
        long flags = 0;
        OLECHAR *olefilename;
        CPH_FETCH();
index 347a015c5297d9718055d746f0af29007ef9d0e3..bf401f82e83ed6d604568d8c9f46b15c0f883fa0 100644 (file)
@@ -260,7 +260,7 @@ PHPAPI int php_com_zval_from_variant(zval *z, VARIANT *v, int codepage TSRMLS_DC
 /* {{{ com_variant_create_instance - ctor for new VARIANT() */
 PHP_FUNCTION(com_variant_create_instance)
 {
-       VARTYPE vt = VT_EMPTY;
+       /* VARTYPE == unsigned short */ long vt = VT_EMPTY;
        long codepage = CP_ACP;
        zval *object = getThis();
        php_com_dotnet_object *obj;
@@ -290,7 +290,7 @@ PHP_FUNCTION(com_variant_create_instance)
 
        if (ZEND_NUM_ARGS() >= 2) {
 
-               res = VariantChangeType(&obj->v, &obj->v, 0, vt);
+               res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
 
                if (FAILED(res)) {
                        char *werr, *msg;
@@ -788,7 +788,7 @@ PHP_FUNCTION(variant_date_to_timestamp)
    Returns a variant date representation of a unix timestamp */
 PHP_FUNCTION(variant_date_from_timestamp)
 {
-       int timestamp;
+       long timestamp;
        SYSTEMTIME systime;
        struct tm *tmv;
        VARIANT res;
@@ -841,7 +841,7 @@ PHP_FUNCTION(variant_set_type)
 {
        zval *zobj;
        php_com_dotnet_object *obj;
-       VARTYPE vt;
+       /* VARTYPE == unsigned short */ long vt;
        HRESULT res;
 
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
@@ -850,7 +850,7 @@ PHP_FUNCTION(variant_set_type)
        }
        obj = CDNO_FETCH(zobj);
 
-       res = VariantChangeType(&obj->v, &obj->v, 0, vt);
+       res = VariantChangeType(&obj->v, &obj->v, 0, (VARTYPE)vt);
 
        if (SUCCEEDED(res)) {
                if (vt != VT_DISPATCH && obj->typeinfo) {
@@ -876,7 +876,7 @@ PHP_FUNCTION(variant_cast)
 {
        zval *zobj;
        php_com_dotnet_object *obj;
-       VARTYPE vt;
+       /* VARTYPE == unsigned short */ long vt;
        VARIANT vres;
        HRESULT res;
 
@@ -887,7 +887,7 @@ PHP_FUNCTION(variant_cast)
        obj = CDNO_FETCH(zobj);
 
        VariantInit(&vres);
-       res = VariantChangeType(&vres, &obj->v, 0, vt);
+       res = VariantChangeType(&vres, &obj->v, 0, (VARTYPE)vt);
 
        if (SUCCEEDED(res)) {
                php_com_wrap_variant(return_value, &vres, obj->code_page TSRMLS_CC);
index 31ce713f1773e67d541fadf893a600eae3f88733..f24f7cfbfbc72a2478d85b51269fc6bde9db8131 100644 (file)
@@ -36,7 +36,7 @@ typedef struct _php_com_dotnet_object {
        VARIANT v;
 
        ITypeInfo *typeinfo;
-       int code_page;
+       long code_page;
        unsigned int have_default_bind:1;
 
        zend_class_entry *ce;
index 48a229ef22c5606e347711942ead0cba3fdf28c2..7a45cf46a1c3d55b51c4fc9b173da112c60e5c02 100755 (executable)
@@ -177,7 +177,7 @@ SPL_METHOD(DirectoryIterator, __construct)
        zval *object = getThis();
        spl_ce_dir_object *intern;
        char *path;
-       long len;
+       int len;
 
        php_set_error_handling(EH_THROW, zend_exception_get_default() TSRMLS_CC);
 
index 83c84e4a86772a2d2a93b58a5b2712166ac2cbd8..01123110b7e5b2e8f94a41cd585efa68e223952e 100644 (file)
@@ -1157,7 +1157,7 @@ PHP_FUNCTION(sqlite_popen)
 {
        long mode = 0666;
        char *filename, *fullpath, *hashkey;
-       long filename_len, hashkeylen;
+       int filename_len, hashkeylen;
        zval *errmsg = NULL;
        struct php_sqlite_db *db = NULL;
        list_entry *le;
@@ -1231,7 +1231,7 @@ PHP_FUNCTION(sqlite_open)
 {
        long mode = 0666;
        char *filename, *fullpath = NULL;
-       long filename_len;
+       int filename_len;
        zval *errmsg = NULL;
        zval *object = getThis();
 
@@ -1286,7 +1286,7 @@ PHP_FUNCTION(sqlite_factory)
 {
        long mode = 0666;
        char *filename, *fullpath = NULL;
-       long filename_len;
+       int filename_len;
        zval *errmsg = NULL;
 
        php_set_error_handling(EH_THROW, sqlite_ce_exception TSRMLS_CC);
@@ -1533,7 +1533,7 @@ PHP_FUNCTION(sqlite_unbuffered_query)
        zval *zdb;
        struct php_sqlite_db *db;
        char *sql;
-       long sql_len;
+       int sql_len;
        long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zval *object = getThis();
@@ -1576,7 +1576,7 @@ PHP_FUNCTION(sqlite_fetch_column_types)
        zval *zdb;
        struct php_sqlite_db *db;
        char *tbl, *sql;
-       long tbl_len;
+       int tbl_len;
        char *errtext = NULL;
        zval *object = getThis();
        struct php_sqlite_result res;
@@ -1642,7 +1642,7 @@ PHP_FUNCTION(sqlite_query)
        zval *zdb;
        struct php_sqlite_db *db;
        char *sql;
-       long sql_len;
+       int sql_len;
        long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zval *object = getThis();
@@ -1685,7 +1685,7 @@ PHP_FUNCTION(sqlite_exec)
        zval *zdb;
        struct php_sqlite_db *db;
        char *sql;
-       long sql_len;
+       int sql_len;
        char *errtext = NULL;
        zval *object = getThis();
 
@@ -2041,7 +2041,7 @@ PHP_FUNCTION(sqlite_array_query)
        struct php_sqlite_db *db;
        struct php_sqlite_result *rres;
        char *sql;
-       long sql_len;
+       int sql_len;
        long mode = PHPSQLITE_BOTH;
        char *errtext = NULL;
        zend_bool decode_binary = 1;
@@ -2157,7 +2157,7 @@ PHP_FUNCTION(sqlite_single_query)
        struct php_sqlite_db *db;
        struct php_sqlite_result *rres;
        char *sql;
-       long sql_len;
+       int sql_len;
        char *errtext = NULL;
        zend_bool decode_binary = 1;
        zend_bool srow = 1;
@@ -2802,7 +2802,7 @@ static enum callback_prep_t prep_callback_struct(struct php_sqlite_db *db, int i
 PHP_FUNCTION(sqlite_create_aggregate)
 {
        char *funcname = NULL;
-       long funcname_len;
+       int funcname_len;
        zval *zstep, *zfinal, *zdb;
        struct php_sqlite_db *db;
        struct php_sqlite_agg_functions *funcs;
@@ -2852,7 +2852,7 @@ PHP_FUNCTION(sqlite_create_aggregate)
 PHP_FUNCTION(sqlite_create_function)
 {
        char *funcname = NULL;
-       long funcname_len;
+       int funcname_len;
        zval *zcall, *zdb;
        struct php_sqlite_db *db;
        struct php_sqlite_agg_functions *funcs;
@@ -2920,7 +2920,7 @@ PHP_FUNCTION(sqlite_udf_encode_binary)
 PHP_FUNCTION(sqlite_udf_decode_binary)
 {
        char *data = NULL;
-       long datalen;
+       int datalen;
 
        if (FAILURE == zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s!", &data, &datalen)) {
                return;
index 9642c93781ea023b0f92ed0a335047f49d8eef98..2ee0ed71122bafc7ed7df965175b8910fb8f9a6e 100644 (file)
@@ -176,7 +176,7 @@ PHP_MINIT_FUNCTION(dir)
 static void _php_do_opendir(INTERNAL_FUNCTION_PARAMETERS, int createobject)
 {
        char *dirname;
-       long dir_len;
+       int dir_len;
        zval *zcontext = NULL;
        php_stream_context *context = NULL;
        php_stream *dirp;
index 420558a59eac735bfb6e5a041301991371f7bd8b..6041fa4249fab984812011a61cd33a7e171c5979 100644 (file)
@@ -500,7 +500,7 @@ PHP_FUNCTION(file_put_contents)
 {
        php_stream *stream;
        char *filename;
-       size_t filename_len;
+       int filename_len;
        zval *data;
        int numbytes = 0;
        long flags = 0;
@@ -1287,7 +1287,8 @@ PHPAPI int php_mkdir(char *dir, long mode TSRMLS_DC)
 PHP_FUNCTION(mkdir)
 {
        zval *zcontext = NULL;
-       long dir_len, mode = 0777;
+       long mode = 0777;
+       int dir_len;
        zend_bool recursive = 0;
        char *dir;
        php_stream_context *context;
@@ -1307,9 +1308,9 @@ PHP_FUNCTION(mkdir)
 PHP_FUNCTION(rmdir)
 {
        char *dir;
-       long dir_len;
        zval *zcontext = NULL;
        php_stream_context *context;
+       int dir_len;
 
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|r", &dir, &dir_len, &zcontext) == FAILURE) {
                RETURN_FALSE;
@@ -1325,8 +1326,8 @@ PHP_FUNCTION(rmdir)
    Output a file or a URL */
 PHP_FUNCTION(readfile)
 {
-       int size = 0;
        char *filename;
+       int size = 0;
        int filename_len;
        zend_bool use_include_path = 0;
        zval *zcontext = NULL;
index 911c2d7a8ccaa63e1fd42fedfbd12238faf2a840..35d6dd7e1d3fc5a8ab54d9f4878d68ae20471657 100644 (file)
@@ -32,7 +32,7 @@
 static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
 {
        char *host;
-       long host_len;
+       int host_len;
        long port = -1;
        zval *zerrno = NULL, *zerrstr = NULL;
        double timeout = FG(default_socket_timeout);
index 2041d3481ff389e9b2f17d3073176bfdffb0494a..8b036faea418c2dbccd115199fc3f65e6724e498 100644 (file)
@@ -459,7 +459,7 @@ struct php_proc_open_descriptor_item {
 PHP_FUNCTION(proc_open)
 {
        char *command, *cwd=NULL;
-       long command_len, cwd_len;
+       int command_len, cwd_len;
        zval *descriptorspec;
        zval *pipes;
        zval *environment = NULL;
index 858638804b7df64956e89d6f147f2d5e7e601864..b73fabe8d8dc60852399d07d4f7bb2f5e225e2d0 100644 (file)
@@ -46,7 +46,7 @@ static php_stream_context *decode_context_param(zval *contextresource TSRMLS_DC)
 PHP_FUNCTION(stream_socket_client)
 {
        char *host;
-       long host_len;
+       int host_len;
        zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL;
        double timeout = FG(default_socket_timeout);
        unsigned long conv;
@@ -133,7 +133,7 @@ PHP_FUNCTION(stream_socket_client)
 PHP_FUNCTION(stream_socket_server)
 {
        char *host;
-       long host_len;
+       int host_len;
        zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL;
        php_stream *stream = NULL;
        int err = 0;
@@ -274,7 +274,7 @@ PHP_FUNCTION(stream_socket_sendto)
        zval *zstream;
        long flags = 0;
        char *data, *target_addr = NULL;
-       long datalen, target_addr_len = 0;
+       int datalen, target_addr_len = 0;
        php_sockaddr_storage sa;
        socklen_t sl = 0;