You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by st...@locus.apache.org on 2000/08/14 22:55:46 UTC

cvs commit: apache-2.0/src/ap ap_buckets_heap.c ap_buckets_mmap.c ap_buckets_transient.c

stoddard    00/08/14 13:55:45

  Modified:    src/ap   ap_buckets_heap.c ap_buckets_mmap.c
                        ap_buckets_transient.c
  Log:
  Win32: Cast void* to char* to let the VC++ know how to do simple
  pointer arithmetic. I am suprised gcc lets this one by.
  
  Revision  Changes    Path
  1.5       +4 -4      apache-2.0/src/ap/ap_buckets_heap.c
  
  Index: ap_buckets_heap.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_heap.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ap_buckets_heap.c	2000/08/14 03:07:57	1.4
  +++ ap_buckets_heap.c	2000/08/14 20:55:45	1.5
  @@ -91,8 +91,8 @@
       b->alloc_addr = a->alloc_addr;
       b->alloc_len = a->alloc_len;
       b->end = a->end;
  -    a->end = a->start + nbyte;
  -    b->start = a->end + 1;
  +    a->end = (char *) a->start + nbyte;
  +    b->start = (char *) a->end + 1;
       newbuck->length = e->length - nbyte;
       e->length = nbyte;
   
  @@ -150,7 +150,7 @@
       b->alloc_len  = DEFAULT_RWBUF_SIZE;
       memcpy(b->alloc_addr, a->start, e->length);
       b->start      = b->alloc_addr;
  -    b->end        = b->start + e->length;
  +    b->end        = (char *) b->start + e->length;
   
       e->type       = AP_BUCKET_HEAP;
       e->read       = heap_get_str;
  @@ -175,7 +175,7 @@
   
       newbuf->data       = b;
       heap_insert(newbuf, buf, nbyte, w); 
  -    newbuf->length     = b->end - b->start;
  +    newbuf->length     = (char *) b->end - (char *) b->start;
   
       newbuf->type       = AP_BUCKET_HEAP;
       newbuf->read       = heap_get_str;
  
  
  
  1.4       +3 -3      apache-2.0/src/ap/ap_buckets_mmap.c
  
  Index: ap_buckets_mmap.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_mmap.c,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ap_buckets_mmap.c	2000/08/14 00:55:20	1.3
  +++ ap_buckets_mmap.c	2000/08/14 20:55:45	1.4
  @@ -76,7 +76,7 @@
       b->sub->refcount = 1;
   
       b->start = mm->mm;
  -    b->end = mm->mm + nbytes;
  +    b->end = (char *) mm->mm + nbytes;
       *w = nbytes;
       return APR_SUCCESS;
   }
  @@ -90,9 +90,9 @@
   
       newbuck = ap_bucket_mmap_create(a->sub->mmap, e->length, &dump);
       b = (ap_bucket_mmap *)newbuck->data;
  -    b->start = a->start + nbyte + 1;
  +    b->start = (char *) a->start + nbyte + 1;
       b->end = a->end;
  -    a->end = a->start + nbyte;
  +    a->end = (char *) a->start + nbyte;
       newbuck->length = e->length - nbyte;
       e->length = nbyte;
   
  
  
  
  1.5       +3 -3      apache-2.0/src/ap/ap_buckets_transient.c
  
  Index: ap_buckets_transient.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/ap/ap_buckets_transient.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- ap_buckets_transient.c	2000/08/14 00:55:20	1.4
  +++ ap_buckets_transient.c	2000/08/14 20:55:45	1.5
  @@ -83,8 +83,8 @@
       b = (ap_bucket_transient *)newbuck->data;
   
       b->end = a->end;
  -    a->end = a->start + nbyte;
  -    b->start = a->end + 1; 
  +    a->end = (char*) a->start + nbyte;
  +    b->start = (char *) a->end + 1; 
   
       newbuck->length = e->length - nbyte;
       e->length = nbyte;
  @@ -136,7 +136,7 @@
   
       newbuf->data          = b;
       transient_insert(newbuf, buf, nbyte, w);
  -    newbuf->length        = b->end - b->start;
  +    newbuf->length        = (char *) b->end - (char *) b->start;
   
       newbuf->type          = AP_BUCKET_TRANSIENT;
       newbuf->read          = transient_get_str;