You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by co...@apache.org on 2005/10/03 13:06:11 UTC
svn commit: r293305 - in /httpd/httpd/branches/2.2.x/modules: dav/fs/dbm.c
dav/fs/repos.c dav/main/liveprop.c dav/main/mod_dav.h dav/main/props.c
dav/main/std_liveprop.c generators/mod_cgid.c
Author: colm
Date: Mon Oct 3 04:06:04 2005
New Revision: 293305
URL: http://svn.apache.org/viewcvs?rev=293305&view=rev
Log:
Merge r239422 and r239423 from trunk; these are (long) casts to fix 64-bit
build warnings by asteinmetz. Tested on IA64, x64 and x86.
Originally by: asteinmetz
Reviewed by: colm
Modified:
httpd/httpd/branches/2.2.x/modules/dav/fs/dbm.c
httpd/httpd/branches/2.2.x/modules/dav/fs/repos.c
httpd/httpd/branches/2.2.x/modules/dav/main/liveprop.c
httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h
httpd/httpd/branches/2.2.x/modules/dav/main/props.c
httpd/httpd/branches/2.2.x/modules/dav/main/std_liveprop.c
httpd/httpd/branches/2.2.x/modules/generators/mod_cgid.c
Modified: httpd/httpd/branches/2.2.x/modules/dav/fs/dbm.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/fs/dbm.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/fs/dbm.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/fs/dbm.c Mon Oct 3 04:06:04 2005
@@ -304,7 +304,7 @@
l_ns = 0;
}
else {
- int ns_id = (int)apr_hash_get(db->uri_index, name->ns,
+ long ns_id = (long)apr_hash_get(db->uri_index, name->ns,
APR_HASH_KEY_STRING);
@@ -313,7 +313,7 @@
return key; /* zeroed */
}
- l_ns = sprintf(nsbuf, "%d", ns_id - 1);
+ l_ns = sprintf(nsbuf, "%ld", ns_id - 1);
}
/* assemble: #:name */
@@ -430,7 +430,7 @@
}
else {
dav_propdb_metadata m;
- int ns;
+ long ns;
const char *uri;
dav_set_bufsize(pool, &db->ns_table, value.dsize);
@@ -568,7 +568,7 @@
const char *uri = *puri;
apr_size_t uri_len = strlen(uri);
- int ns_id = (int)apr_hash_get(db->uri_index, uri, uri_len);
+ long ns_id = (long)apr_hash_get(db->uri_index, uri, uri_len);
if (ns_id == 0) {
dav_check_bufsize(db->pool, &db->ns_table, uri_len + 1);
@@ -578,7 +578,7 @@
/* copy the uri in case the passed-in namespaces changes in
some way. */
apr_hash_set(db->uri_index, apr_pstrdup(db->pool, uri), uri_len,
- (void *)(db->ns_count + 1));
+ (void *)((long)(db->ns_count + 1)));
db->ns_table_dirty = 1;
Modified: httpd/httpd/branches/2.2.x/modules/dav/fs/repos.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/fs/repos.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/fs/repos.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/fs/repos.c Mon Oct 3 04:06:04 2005
@@ -1988,7 +1988,7 @@
"submitted is invalid.");
}
- *context = (void *)(value == 'T');
+ *context = (void *)((long)(value == 'T'));
return NULL;
@@ -2006,9 +2006,9 @@
void *context,
dav_liveprop_rollback **rollback_ctx)
{
- int value = context != NULL;
+ long value = context != NULL;
apr_fileperms_t perms = resource->info->finfo.protection;
- int old_value = (perms & APR_UEXECUTE) != 0;
+ long old_value = (perms & APR_UEXECUTE) != 0;
/* assert: prop == executable. operation == SET. */
Modified: httpd/httpd/branches/2.2.x/modules/dav/main/liveprop.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/main/liveprop.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/liveprop.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/liveprop.c Mon Oct 3 04:06:04 2005
@@ -23,7 +23,7 @@
static apr_hash_t *dav_liveprop_uris = NULL;
-static int dav_liveprop_count = 0;
+static long dav_liveprop_count = 0;
static apr_status_t dav_cleanup_liveprops(void *ctx)
@@ -35,14 +35,14 @@
static void dav_register_liveprop_namespace(apr_pool_t *p, const char *uri)
{
- int value;
+ long value;
if (dav_liveprop_uris == NULL) {
dav_liveprop_uris = apr_hash_make(p);
apr_pool_cleanup_register(p, NULL, dav_cleanup_liveprops, apr_pool_cleanup_null);
}
- value = (int)apr_hash_get(dav_liveprop_uris, uri, APR_HASH_KEY_STRING);
+ value = (long)apr_hash_get(dav_liveprop_uris, uri, APR_HASH_KEY_STRING);
if (value != 0) {
/* already registered */
return;
@@ -53,12 +53,12 @@
(void *)++dav_liveprop_count);
}
-DAV_DECLARE(int) dav_get_liveprop_ns_index(const char *uri)
+DAV_DECLARE(long) dav_get_liveprop_ns_index(const char *uri)
{
- return (int)apr_hash_get(dav_liveprop_uris, uri, APR_HASH_KEY_STRING);
+ return (long)apr_hash_get(dav_liveprop_uris, uri, APR_HASH_KEY_STRING);
}
-DAV_DECLARE(int) dav_get_liveprop_ns_count(void)
+DAV_DECLARE(long) dav_get_liveprop_ns_count(void)
{
return dav_liveprop_count;
}
@@ -75,7 +75,7 @@
apr_hash_this(idx, &key, NULL, &val);
- s = apr_psprintf(p, " xmlns:lp%d=\"%s\"", (int)val, (const char *)key);
+ s = apr_psprintf(p, " xmlns:lp%ld=\"%s\"", (long)val, (const char *)key);
apr_text_append(p, phdr, s);
}
}
@@ -108,7 +108,7 @@
return 0;
}
-DAV_DECLARE(int) dav_get_liveprop_info(int propid,
+DAV_DECLARE(long) dav_get_liveprop_info(int propid,
const dav_liveprop_group *group,
const dav_liveprop_spec **info)
{
Modified: httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/mod_dav.h Mon Oct 3 04:06:04 2005
@@ -881,19 +881,19 @@
const dav_hooks_liveprop **hooks);
/* ### docco */
-DAV_DECLARE(int) dav_get_liveprop_info(int propid,
- const dav_liveprop_group *group,
- const dav_liveprop_spec **info);
+DAV_DECLARE(long) dav_get_liveprop_info(int propid,
+ const dav_liveprop_group *group,
+ const dav_liveprop_spec **info);
/* ### docco */
DAV_DECLARE(void) dav_register_liveprop_group(apr_pool_t *pool,
const dav_liveprop_group *group);
/* ### docco */
-DAV_DECLARE(int) dav_get_liveprop_ns_index(const char *uri);
+DAV_DECLARE(long) dav_get_liveprop_ns_index(const char *uri);
/* ### docco */
-DAV_DECLARE(int) dav_get_liveprop_ns_count(void);
+DAV_DECLARE(long) dav_get_liveprop_ns_count(void);
/* ### docco */
DAV_DECLARE(void) dav_add_all_liveprop_xmlns(apr_pool_t *p,
Modified: httpd/httpd/branches/2.2.x/modules/dav/main/props.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/main/props.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/props.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/props.c Mon Oct 3 04:06:04 2005
@@ -479,12 +479,12 @@
apr_text_append(pool, phdr, s);
}
-static void dav_insert_xmlns(apr_pool_t *p, const char *pre_prefix, int ns,
+static void dav_insert_xmlns(apr_pool_t *p, const char *pre_prefix, long ns,
const char *ns_uri, apr_text_header *phdr)
{
const char *s;
- s = apr_psprintf(p, " xmlns:%s%d=\"%s\"", pre_prefix, ns, ns_uri);
+ s = apr_psprintf(p, " xmlns:%s%ld=\"%s\"", pre_prefix, ns, ns_uri);
apr_text_append(p, phdr, s);
}
@@ -765,7 +765,7 @@
for (scan_ns_uri = priv->provider->namespace_uris;
*scan_ns_uri != NULL;
++scan_ns_uri) {
- int ns;
+ long ns;
ns = dav_get_liveprop_ns_index(*scan_ns_uri);
if (marks_liveprop[ns])
Modified: httpd/httpd/branches/2.2.x/modules/dav/main/std_liveprop.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/dav/main/std_liveprop.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/dav/main/std_liveprop.c (original)
+++ httpd/httpd/branches/2.2.x/modules/dav/main/std_liveprop.c Mon Oct 3 04:06:04 2005
@@ -63,7 +63,7 @@
const char *s;
apr_pool_t *p = resource->pool;
const dav_liveprop_spec *info;
- int global_ns;
+ long global_ns;
switch (propid)
{
@@ -128,11 +128,11 @@
info->name, dav_core_namespace_uris[info->ns]);
}
else if (what == DAV_PROP_INSERT_VALUE && *value != '\0') {
- s = apr_psprintf(p, "<lp%d:%s>%s</lp%d:%s>" DEBUG_CR,
+ s = apr_psprintf(p, "<lp%ld:%s>%s</lp%ld:%s>" DEBUG_CR,
global_ns, info->name, value, global_ns, info->name);
}
else {
- s = apr_psprintf(p, "<lp%d:%s/>" DEBUG_CR, global_ns, info->name);
+ s = apr_psprintf(p, "<lp%ld:%s/>" DEBUG_CR, global_ns, info->name);
}
apr_text_append(p, phdr, s);
Modified: httpd/httpd/branches/2.2.x/modules/generators/mod_cgid.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/branches/2.2.x/modules/generators/mod_cgid.c?rev=293305&r1=293304&r2=293305&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/generators/mod_cgid.c (original)
+++ httpd/httpd/branches/2.2.x/modules/generators/mod_cgid.c Mon Oct 3 04:06:04 2005
@@ -669,7 +669,7 @@
if (cgid_req.req_type == GETPID_REQ) {
pid_t pid;
- pid = (pid_t)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id));
+ pid = (pid_t)((long)apr_hash_get(script_hash, &cgid_req.conn_id, sizeof(cgid_req.conn_id)));
if (write(sd2, &pid, sizeof(pid)) != sizeof(pid)) {
ap_log_error(APLOG_MARK, APLOG_ERR, 0,
main_server,
@@ -776,7 +776,7 @@
memcpy(key, &cgid_req.conn_id, sizeof(cgid_req.conn_id));
}
apr_hash_set(script_hash, key, sizeof(cgid_req.conn_id),
- (void *)procnew->pid);
+ (void *)((long)procnew->pid));
}
}
}
@@ -1092,7 +1092,7 @@
static apr_status_t close_unix_socket(void *thefd)
{
- int fd = (int)thefd;
+ int fd = (int)((long)thefd);
return close(fd);
}
@@ -1135,8 +1135,8 @@
}
}
else {
- apr_pool_cleanup_register(r->pool, (void *)sd, close_unix_socket,
- apr_pool_cleanup_null);
+ apr_pool_cleanup_register(r->pool, (void *)((long)sd),
+ close_unix_socket, apr_pool_cleanup_null);
break; /* we got connected! */
}
/* gotta try again, but make sure the cgid daemon is still around */
@@ -1369,7 +1369,7 @@
*/
apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
- apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket);
+ apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
if ((argv0 = strrchr(r->filename, '/')) != NULL)
argv0++;
@@ -1664,7 +1664,7 @@
* get rid of the cleanup we registered when we created the socket.
*/
apr_os_pipe_put_ex(&tempsock, &sd, 1, r->pool);
- apr_pool_cleanup_kill(r->pool, (void *)sd, close_unix_socket);
+ apr_pool_cleanup_kill(r->pool, (void *)((long)sd), close_unix_socket);
APR_BRIGADE_INSERT_TAIL(bb, apr_bucket_pipe_create(tempsock,
f->c->bucket_alloc));