httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor J. Orlikowski" <v.j.orlikow...@gte.net>
Subject [PATCH] Numerous type fixes, for xlC
Date Thu, 14 Sep 2000 15:14:06 GMT
xlC gets upset when you try to feed a long into an int. This set of type
fixes makes sure we use the correct thing (ap_bucket->read wants an
apr_ssize_t, gosh darn it!). Further, iov_len needs to be cast to
apr_ssize_t, since the types do not match on AIX. Last, but not least, we
remove an unneeded constification in ab. 

Index: src/ap/ap_buckets.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/ap/ap_buckets.c,v
retrieving revision 1.15
diff -u -r1.15 ap_buckets.c
--- ap_buckets.c	2000/09/09 06:48:07	1.15
+++ ap_buckets.c	2000/09/14 14:59:45
@@ -130,7 +130,7 @@
     AP_BRIGADE_FOREACH(e, b) {
 	if (nvec-- == 0)
             break;
-	e->read(e, (const char **)&vec->iov_base, &vec->iov_len, 0);
+	e->read(e, (const char **)&vec->iov_base, (apr_ssize_t*)&vec->iov_len,
0);
 	++vec;
     }
     return vec - orig;
Index: src/main/http_core.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/main/http_core.c,v
retrieving revision 1.121
diff -u -r1.121 http_core.c
--- http_core.c	2000/09/14 05:08:41	1.121
+++ http_core.c	2000/09/14 14:59:49
@@ -3062,9 +3062,8 @@
     request_rec *r = f->r;
 #endif
     apr_status_t rv;
-    apr_ssize_t bytes_sent = 0;
+    apr_ssize_t bytes_sent = 0, len = 0, written;
     ap_bucket *e;
-    int len = 0, written;
     const char *str;
     
 #if 0 /* XXX: bit rot! */
Index: src/modules/standard/mod_include.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/modules/standard/mod_include.c,v
retrieving revision 1.54
diff -u -r1.54 mod_include.c
--- mod_include.c	2000/09/13 19:10:33	1.54
+++ mod_include.c	2000/09/14 14:59:57
@@ -184,7 +184,7 @@
 
 static ap_bucket *find_string(ap_bucket *dptr, const char *str, ap_bucket *end)
 {
-    int len;
+    apr_ssize_t len;
     const char *c;
     const char *buf;
     int state = 0;
@@ -335,9 +335,8 @@
     ap_bucket *dptr = in;
     const char *c;
     const char *str;
-    int length; 
+    apr_ssize_t length; 
     char *t = tag, *tag_val, term;
-    int len;
 
     /* makes code below a little less cluttered */
     --tagbuf_len;
@@ -468,7 +467,7 @@
     char *d = dest;
     const char *c;
     const char *str;
-    int length; 
+    apr_ssize_t length; 
 
     /* make room for nul terminator */
     --len;
Index: src/support/ab.c
===================================================================
RCS file: /cvs/apache/apache-2.0/src/support/ab.c,v
retrieving revision 1.26
diff -u -r1.26 ab.c
--- ab.c	2000/08/10 12:52:37	1.26
+++ ab.c	2000/09/14 14:59:58
@@ -1008,7 +1008,7 @@
 #endif
 
     apr_initopt(&opt, cntxt, argc, argv);
-    while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:", &c, &optarg))
== APR_SUCCESS) {
+    while ((status = apr_getopt(opt, "n:c:t:T:p:v:kVhwix:y:z:C:H:P:A:", &c, (const char**)
&optarg)) == APR_SUCCESS) {
         switch (c) {
         case 'n':
             requests = atoi(optarg);

-- 
Victor J. Orlikowski
======================
v.j.orlikowski@gte.net
vjo@raleigh.ibm.com
vjo@us.ibm.com


Mime
View raw message