On Mon, Jul 15, 2002 at 02:19:06PM +0200, Peter Poeml wrote:
> 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. 

I just noticed that the patch I sent you doesn't apply against the CVS
head branch anymore. Sorry about that.

Please find a revised patch attached!

Thanks,
Peter

-- 
VFS: Busy inodes after unmount. Self-destruct in 5 seconds.  Have a nice day...
Index: modules/dav/fs/dbm.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/dav/fs/dbm.c,v
retrieving revision 1.25
diff -u -r1.25 dbm.c
--- modules/dav/fs/dbm.c        10 Jul 2002 06:01:10 -0000      1.25
+++ modules/dav/fs/dbm.c        15 Jul 2002 12:30:57 -0000
@@ -344,7 +344,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);
 
 
@@ -353,7 +353,7 @@
             return key;         /* zeroed */
         }
 
-        l_ns = sprintf(nsbuf, "%d", ns_id - 1);
+        l_ns = sprintf(nsbuf, "%ld", ns_id - 1);
     }
 
     /* assemble: #:name */
@@ -608,7 +608,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);
Index: modules/dav/fs/repos.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/dav/fs/repos.c,v
retrieving revision 1.70
diff -u -r1.70 repos.c
--- modules/dav/fs/repos.c      23 Jun 2002 06:46:52 -0000      1.70
+++ modules/dav/fs/repos.c      15 Jul 2002 12:30:58 -0000
@@ -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 */
Index: modules/dav/main/liveprop.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/dav/main/liveprop.c,v
retrieving revision 1.13
diff -u -r1.13 liveprop.c
--- modules/dav/main/liveprop.c 23 Jun 2002 06:42:13 -0000      1.13
+++ modules/dav/main/liveprop.c 15 Jul 2002 12:30:58 -0000
@@ -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);
         apr_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)
 {
Index: modules/dav/main/mod_dav.h
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/dav/main/mod_dav.h,v
retrieving revision 1.63
diff -u -r1.63 mod_dav.h
--- modules/dav/main/mod_dav.h  23 Jun 2002 06:42:13 -0000      1.63
+++ modules/dav/main/mod_dav.h  15 Jul 2002 12:30:58 -0000
@@ -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);

Reply via email to