matts       01/02/24 10:13:46

  Modified:    c        apache_multipart_buffer.c
  Log:
  Fix for compiling on Sun C Workshop compiler
  Submitted by: Matt Sergeant
  
  Revision  Changes    Path
  1.5       +3 -3      httpd-apreq/c/apache_multipart_buffer.c
  
  Index: apache_multipart_buffer.c
  ===================================================================
  RCS file: /home/cvs/httpd-apreq/c/apache_multipart_buffer.c,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apache_multipart_buffer.c 2001/01/03 03:58:56     1.4
  +++ apache_multipart_buffer.c 2001/02/24 18:13:46     1.5
  @@ -64,17 +64,17 @@
     if partial is true, partial matches are allowed at the end of the buffer.
     returns NULL if not found, or a pointer to the start of the first match.
   */
  -void* my_memstr(void* haystack, int haystacklen, const char* needle,
  +void* my_memstr(char* haystack, int haystacklen, const char* needle,
                int partial)
   {
       int needlen = strlen(needle);
       int len = haystacklen;
  -    unsigned char *ptr = haystack;
  +    char *ptr = haystack;
       
       /* iterate through first character matches */
       while( (ptr = memchr(ptr, needle[0], len)) ) {
        /* calculate length after match */
  -     len = haystacklen - (ptr - (unsigned char *)haystack);
  +     len = haystacklen - (ptr - (char *)haystack);
   
        /* done if matches up to capacity of buffer */
        if(memcmp(needle, ptr, needlen < len ? needlen : len) == 0 &&
  
  
  

Reply via email to