Hi,
building httpd-2.0.39 on x86_64 (AMD's upcoming 64 bit architecture)
there are a few compiler warnings, e.g. due to misfitting type casts.
While some of the warnings can be ignored, I believe that the attached
patch fixes the relevant issues.
Peter
--
VFS: Busy inodes after unmount. Self-destruct in 5 seconds. Have a nice day...
diff -uNr httpd-2.0.39.orig/modules/dav/fs/dbm.c httpd-2.0.39/modules/dav/fs/dbm.c
--- httpd-2.0.39.orig/modules/dav/fs/dbm.c Sat Apr 6 02:19:19 2002
+++ httpd-2.0.39/modules/dav/fs/dbm.c Mon Jul 15 14:09:27 2002
@@ -345,7 +345,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);
@@ -354,7 +354,7 @@
return key; /* zeroed */
}
- l_ns = sprintf(nsbuf, "%d", ns_id - 1);
+ l_ns = sprintf(nsbuf, "%ld", ns_id - 1);
}
/* assemble: #:name */
@@ -609,7 +609,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);
diff -uNr httpd-2.0.39.orig/modules/dav/fs/repos.c httpd-2.0.39/modules/dav/fs/repos.c
--- httpd-2.0.39.orig/modules/dav/fs/repos.c Sat Apr 6 03:11:49 2002
+++ httpd-2.0.39/modules/dav/fs/repos.c Mon Jul 15 14:09:27 2002
@@ -1829,7 +1829,7 @@
const char *s;
apr_pool_t *p = resource->info->pool;
const dav_liveprop_spec *info;
- int global_ns;
+ long global_ns;
/* an HTTP-date can be 29 chars plus a null term */
/* a 64-bit size can be 20 chars plus a null term */
@@ -1910,11 +1910,11 @@
/* DBG3("FS: inserting lp%d:%s (local %d)", ns, scan->name, scan->ns); */
if (what == DAV_PROP_INSERT_VALUE) {
- 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 if (what == DAV_PROP_INSERT_NAME) {
- 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);
}
else {
/* assert: what == DAV_PROP_INSERT_SUPPORTED */
diff -uNr httpd-2.0.39.orig/modules/dav/main/liveprop.c
httpd-2.0.39/modules/dav/main/liveprop.c
--- httpd-2.0.39.orig/modules/dav/main/liveprop.c Wed Mar 13 21:47:45 2002
+++ httpd-2.0.39/modules/dav/main/liveprop.c Mon Jul 15 14:09:27 2002
@@ -73,14 +73,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;
@@ -91,9 +91,9 @@
(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);
}
int dav_get_liveprop_ns_count(void)
@@ -112,7 +112,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);
ap_text_append(p, phdr, s);
}
}
@@ -145,7 +145,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)
{
diff -uNr httpd-2.0.39.orig/modules/dav/main/mod_dav.h
httpd-2.0.39/modules/dav/main/mod_dav.h
--- httpd-2.0.39.orig/modules/dav/main/mod_dav.h Fri May 17 13:24:16 2002
+++ httpd-2.0.39/modules/dav/main/mod_dav.h Mon Jul 15 14:09:27 2002
@@ -899,7 +899,7 @@
const dav_hooks_liveprop **hooks);
/* ### docco */
-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);
@@ -908,7 +908,7 @@
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 */
int dav_get_liveprop_ns_count(void);