[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: BeOS PPC Compilation Fixes

From: Sam TH <sam_at_uchicago.edu>
Date: 2000-12-03 09:48:10 CET

Neon patch:

These are all just casts.

diff -ur neon-0.7.7/src/http_auth.c neon/src/http_auth.c
--- neon-0.7.7/src/http_auth.c Sat Oct 7 13:26:10 2000
+++ neon/src/http_auth.c Sat Dec 2 22:54:55 2000
@@ -401,7 +401,7 @@
             /* Now we calculate the SESSION H(A1)
              * A1 = H(...above...) ":" unq(nonce-value) ":" unq(cnonce-value)
              */
- md5_to_ascii(tmp_md5, tmp_md5_ascii);
+ md5_to_ascii((const unsigned char *)tmp_md5, tmp_md5_ascii);
             md5_init_ctx(&a1);
             md5_process_bytes(tmp_md5_ascii, 32, &a1);
             md5_process_bytes(":", 1, &a1);
@@ -462,7 +462,7 @@
                 md5_buffer(sess->body_buffer, strlen(sess->body_buffer),
                             tmp_md5);
             }
- md5_to_ascii(tmp_md5, tmp_md5_ascii);
+ md5_to_ascii((const unsigned char *)tmp_md5, tmp_md5_ascii);
             DEBUG(DEBUG_HTTPAUTH, "H(entity-body) is [%s]\n", tmp_md5_ascii);
             /* Append to A2 */
             md5_process_bytes(":", 1, &a2);
diff -ur neon-0.7.7/src/http_request.c neon/src/http_request.c
--- neon-0.7.7/src/http_request.c Mon Sep 11 09:31:33 2000
+++ neon/src/http_request.c Sat Dec 2 22:54:55 2000
@@ -1262,7 +1262,7 @@
     do {
         /* Read a block */
         readlen = BUFSIZ;
- ret = read_response_block(req, &req->resp, buffer, &readlen);
+ ret = read_response_block(req, &req->resp, buffer, (size_t *)&readlen);
         
         /* TODO: Do we need to call them if readlen==0, or if
          * readlen == -1, to tell them something has gone wrong? */
diff -ur neon-0.7.7/src/uri.c neon/src/uri.c
--- neon-0.7.7/src/uri.c Wed Aug 2 05:23:03 2000
+++ neon/src/uri.c Sat Dec 2 22:54:55 2000
@@ -226,7 +226,7 @@
     const signed char *pnt;
     char *ret, *retpos;
     int count = 0;
- for (pnt = abs_path; *pnt != '\0'; pnt++) {
+ for (pnt = (const signed char *)abs_path; *pnt != '\0'; pnt++) {
         if (ESCAPE(*pnt)) {
             count++;
         }
@@ -237,7 +237,7 @@
     /* An escaped character is "%xx", i.e., two MORE
      * characters than the original string */
     retpos = ret = ne_malloc(strlen(abs_path) + 2*count + 1);
- for (pnt = abs_path; *pnt != '\0'; pnt++) {
+ for (pnt = (const signed char *)abs_path; *pnt != '\0'; pnt++) {
         if (ESCAPE(*pnt)) {
             /* Escape it - %<hex><hex> */
             sprintf(retpos, "%%%02x", (unsigned char) *pnt);
           
This patch is wrong, however I include it to demonstrate the problem. There is no arpa/inet.h on the system I'm on (no inet.h at all in fact). The only thing needed from that file is the defintion of MSG_PEEK (which is defined nowhere in my headers). So I took out the include, and added the definition, which fixed the problem. I took the define from the headers on my linux box.

However, this is obviously the wrong solution. What's the right one?

diff -ur neon-0.7.7/src/socket.c neon/src/socket.c
--- neon-0.7.7/src/socket.c Thu Oct 26 16:28:45 2000
+++ neon/src/socket.c Sat Dec 2 22:54:55 2000
@@ -64,7 +64,7 @@
 #endif
 
 #include <netinet/in.h>
-#include <arpa/inet.h>
+/*#include <arpa/inet.h>*/
 #include <netdb.h>
 
 #include <errno.h>
@@ -103,6 +103,8 @@
 #define ERROR_SSL_STRING (ERR_reason_error_string(ERR_get_error()))
 
 #endif
+
+#define MSG_PEEK 0x02
 
 struct nsocket_s {
     int fd;

Thanks

        sam th
        sam@uchicago.edu
        http://www.abisource.com/~sam/
        GnuPG Key:
        http://www.abisource.com/~sam/key

  • application/pgp-signature attachment: stored
Received on Sat Oct 21 14:36:16 2006

This is an archived mail posted to the Subversion Dev mailing list.