summaryrefslogtreecommitdiffstats
path: root/modules/dav
diff options
context:
space:
mode:
authorAndreas Steinmetz <asteinmetz@apache.org>2005-08-23 17:45:00 +0200
committerAndreas Steinmetz <asteinmetz@apache.org>2005-08-23 17:45:00 +0200
commit727af3e82bd46389033ddeb3b80b4ee0c0b25095 (patch)
tree39639b331dd0d1ebf2b801605f93f53642bea474 /modules/dav
parentEnhance CacheEnable/CacheDisable to control caching on a per-protocol, per-host (diff)
downloadapache2-727af3e82bd46389033ddeb3b80b4ee0c0b25095.tar.xz
apache2-727af3e82bd46389033ddeb3b80b4ee0c0b25095.zip
fix 64bit build warnings in modules/dav
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@239422 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/dav')
-rw-r--r--modules/dav/fs/dbm.c10
-rw-r--r--modules/dav/fs/repos.c6
-rw-r--r--modules/dav/main/liveprop.c16
-rw-r--r--modules/dav/main/mod_dav.h10
-rw-r--r--modules/dav/main/props.c6
-rw-r--r--modules/dav/main/std_liveprop.c6
6 files changed, 27 insertions, 27 deletions
diff --git a/modules/dav/fs/dbm.c b/modules/dav/fs/dbm.c
index c5493fcf1c..f2d0511e75 100644
--- a/modules/dav/fs/dbm.c
+++ b/modules/dav/fs/dbm.c
@@ -304,7 +304,7 @@ static apr_datum_t dav_build_key(dav_db *db, const dav_prop_name *name)
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 @@ static apr_datum_t dav_build_key(dav_db *db, const dav_prop_name *name)
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 @@ static dav_error * dav_propdb_open(apr_pool_t *pool,
}
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 @@ static dav_error * dav_propdb_map_namespaces(
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 @@ static dav_error * dav_propdb_map_namespaces(
/* 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;
diff --git a/modules/dav/fs/repos.c b/modules/dav/fs/repos.c
index 9c3e974e1e..039b7a6241 100644
--- a/modules/dav/fs/repos.c
+++ b/modules/dav/fs/repos.c
@@ -1988,7 +1988,7 @@ static dav_error *dav_fs_patch_validate(const dav_resource *resource,
"submitted is invalid.");
}
- *context = (void *)(value == 'T');
+ *context = (void *)((long)(value == 'T'));
return NULL;
@@ -2006,9 +2006,9 @@ static dav_error *dav_fs_patch_exec(const dav_resource *resource,
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. */
diff --git a/modules/dav/main/liveprop.c b/modules/dav/main/liveprop.c
index ed7e30ce75..95c22c1cad 100644
--- a/modules/dav/main/liveprop.c
+++ b/modules/dav/main/liveprop.c
@@ -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 apr_status_t dav_cleanup_liveprops(void *ctx)
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 @@ static void dav_register_liveprop_namespace(apr_pool_t *p, const char *uri)
(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 @@ DAV_DECLARE(void) dav_add_all_liveprop_xmlns(apr_pool_t *p,
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 @@ DAV_DECLARE(int) dav_do_find_liveprop(const char *ns_uri, const char *name,
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)
{
diff --git a/modules/dav/main/mod_dav.h b/modules/dav/main/mod_dav.h
index bce7c8dc6f..030f8326ad 100644
--- a/modules/dav/main/mod_dav.h
+++ b/modules/dav/main/mod_dav.h
@@ -876,19 +876,19 @@ DAV_DECLARE(int) dav_do_find_liveprop(const char *ns_uri, const char *name,
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,
diff --git a/modules/dav/main/props.c b/modules/dav/main/props.c
index 480135de67..5bf922d2e2 100644
--- a/modules/dav/main/props.c
+++ b/modules/dav/main/props.c
@@ -479,12 +479,12 @@ static void dav_output_prop_name(apr_pool_t *pool,
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 @@ DAV_DECLARE(dav_get_props_result) dav_get_props(dav_propdb *propdb,
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])
diff --git a/modules/dav/main/std_liveprop.c b/modules/dav/main/std_liveprop.c
index 416472ddc2..caac4a0984 100644
--- a/modules/dav/main/std_liveprop.c
+++ b/modules/dav/main/std_liveprop.c
@@ -63,7 +63,7 @@ static dav_prop_insert dav_core_insert_prop(const dav_resource *resource,
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 @@ static dav_prop_insert dav_core_insert_prop(const dav_resource *resource,
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);