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

BeOS PPC Compilation Fixes

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

Here are a number of fixes to get Subversion to compile on BeOS PPC.
It still doesn't work, but that's another email. Two patches still
need to be committed to APR, and I'll provide a Neon patch in about 30
seconds.

--include-deps removes the gcc dependency generation command, which
other compilers understandably don't like.

Index: autogen.sh
===================================================================
RCS file: /cvs/subversion/autogen.sh,v
retrieving revision 1.27
diff -u -r1.27 autogen.sh
--- autogen.sh 2000/11/21 06:13:07 1.27
+++ autogen.sh 2000/12/03 08:31:44
@@ -21,7 +21,7 @@
 
 # Produce all the `Makefile.in's, verbosely, and create neat missing things
 # like `libtool', `install-sh', etc.
-automake --add-missing --verbose
+automake --add-missing --verbose --include-deps
 
 # If there's a config.cache file, we may need to delete it.
 # If we have an existing configure script, save a copy for comparison.

These fixes are all casts, since the MetroWorks compiler is quite
strict about this sort of thing.

Index: subversion/libsvn_delta/svndiff.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_delta/svndiff.c,v
retrieving revision 1.9
diff -u -r1.9 svndiff.c
--- subversion/libsvn_delta/svndiff.c 2000/11/22 23:48:53 1.9
+++ subversion/libsvn_delta/svndiff.c 2000/12/03 08:31:46
@@ -79,7 +79,7 @@
       *p++ = ((val >> (n * 7)) & 0x7f) | cont;
     }
 
- return p;
+ return (char *)p;
 }
 
 
@@ -89,7 +89,7 @@
 {
   char buf[128], *p;
 
- p = encode_int (buf, val);
+ p = encode_int ((unsigned char *)buf, val);
   svn_string_appendbytes (header, buf, p - buf);
 }
 
@@ -139,10 +139,10 @@
       if (op->length >> 6 == 0)
         *ip++ |= op->length;
       else
- ip = encode_int (ip + 1, op->length);
+ ip = (unsigned char *)encode_int (ip + 1, op->length);
       if (op->action_code != svn_txdelta_new)
- ip = encode_int (ip, op->offset);
- svn_string_appendbytes (instructions, ibuf, ip - ibuf);
+ ip = (unsigned char *)encode_int (ip, op->offset);
+ svn_string_appendbytes (instructions, (const char *)ibuf, ip - ibuf);
     }
 
   /* Encode the header. */
Index: subversion/libsvn_subr/base64.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_subr/base64.c,v
retrieving revision 1.8
diff -u -r1.8 base64.c
--- subversion/libsvn_subr/base64.c 2000/11/26 15:13:13 1.8
+++ subversion/libsvn_subr/base64.c 2000/12/03 08:31:59
@@ -76,7 +76,7 @@
       memcpy (inbuf + *inbuflen, p, 3 - *inbuflen);
       p += (3 - *inbuflen);
       encode_group (inbuf, group);
- svn_string_appendbytes (str, group, 4);
+ svn_string_appendbytes (str, (const char *)group, 4);
       *inbuflen = 0;
       *linelen += 4;
       if (*linelen == BASE64_LINELEN)
@@ -106,7 +106,7 @@
       memset (ingroup + len, 0, 3 - len);
       encode_group (ingroup, outgroup);
       memset (outgroup + (len + 1), '=', 4 - (len + 1));
- svn_string_appendbytes (str, outgroup, 4);
+ svn_string_appendbytes (str, (const char *)outgroup, 4);
       linelen += 4;
     }
   if (linelen > 0)
@@ -127,7 +127,7 @@
   if (*len > 0)
     encode_bytes (encoded, data, *len, eb->buf, &eb->buflen, &eb->linelen);
   else
- encode_partial_group (encoded, eb->buf, eb->buflen, eb->linelen);
+ encode_partial_group (encoded, (const char *)eb->buf, eb->buflen, eb->linelen);
 
   /* Write the output, clean up, go home. */
   enclen = encoded->len;
@@ -170,7 +170,7 @@
   int ingrouplen = 0, linelen = 0;
 
   encode_bytes (encoded, str->data, str->len, ingroup, &ingrouplen, &linelen);
- encode_partial_group (encoded, ingroup, ingrouplen, linelen);
+ encode_partial_group (encoded, (const char *)ingroup, ingrouplen, linelen);
   return encoded;
 }
 
@@ -222,8 +222,8 @@
           if (*inbuflen >= 2)
             {
               memset (inbuf + *inbuflen, 0, 4 - *inbuflen);
- decode_group (inbuf, group);
- svn_string_appendbytes (str, group, *inbuflen - 1);
+ decode_group ((const unsigned char *)inbuf, group);
+ svn_string_appendbytes (str, (const char *)group, *inbuflen - 1);
             }
           *done = TRUE;
         }
@@ -234,8 +234,8 @@
             inbuf[(*inbuflen)++] = find - base64tab;
           if (*inbuflen == 4)
             {
- decode_group (inbuf, group);
- svn_string_appendbytes (str, group, 3);
+ decode_group ((const unsigned char *)inbuf, group);
+ svn_string_appendbytes (str, (const char *)group, 3);
               *inbuflen = 0;
             }
         }
Index: subversion/libsvn_subr/hashdump.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_subr/hashdump.c,v
retrieving revision 1.18
diff -u -r1.18 hashdump.c
--- subversion/libsvn_subr/hashdump.c 2000/11/22 23:49:16 1.18
+++ subversion/libsvn_subr/hashdump.c 2000/12/03 08:32:15
@@ -218,7 +218,7 @@
     {
       /* Read a key length line. Might be END, though. */
       int len = SVN_KEYLINE_MAXLEN;
- err = read_length_line (srcfile, buf, &len);
+ err = read_length_line (srcfile, buf, (unsigned long *)&len);
       if ((err == APR_EOF) && first_time)
         /* We got an EOF on our very first attempt to read, which
            means it's a zero-byte file. No problem, just go home. */
@@ -254,7 +254,7 @@
 
           /* Read a val length line */
           len = SVN_KEYLINE_MAXLEN;
- err = read_length_line (srcfile, buf, &len);
+ err = read_length_line (srcfile, buf, (unsigned long *)&len);
           if (err) return err;
 
           if ((buf[0] == 'V') && (buf[1] == ' '))

BeOS PPC doesn't provide isascii, so we use the version from APR
instead. Note that this requires a patch to APR that should be
committed soon.

Index: subversion/libsvn_delta/tests/vdelta-test.c
===================================================================
RCS file: /cvs/subversion/subversion/libsvn_delta/tests/vdelta-test.c,v
retrieving revision 1.4
diff -u -r1.4 vdelta-test.c
--- subversion/libsvn_delta/tests/vdelta-test.c 2000/11/22 23:48:55 1.4
+++ subversion/libsvn_delta/tests/vdelta-test.c 2000/12/03 08:31:46
@@ -15,6 +15,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <apr_general.h>
+#include <apr_lib.h>
 #include "svn_delta.h"
 #include "svn_error.h"
 
@@ -78,7 +79,7 @@
           for (tmp = offset; tmp < offset + length; ++tmp)
             {
               int const dat = window->new->data[tmp];
- if (iscntrl (dat) || !isascii(dat))
+ if (iscntrl (dat) || !apr_isascii(dat))
                 fprintf (stream, "\\%3.3o", dat & 0xff);
               else if (dat == '\\')
                 fputs ("\\\\", stream);

           
        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.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.