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

[PATCH] build on AIX w/xlc

From: Wilson, Douglas <dgwilson_at_sonomasystems.net>
Date: 2002-10-18 21:11:58 CEST

The following are the patches I used to get Subversion to compile on AIX
4.3.2
with 'CC=xlc' and 'CFLAGS='-g -qfullpath -qdbxextra'
(--enable-maintainer-mode didn't
seem to be good enough for debugging). Sadly, most of the tests still fail.
I believe
this is because of a broken (or incompatible?) iconv. I tried updating my
iconv package
(those that show up with 'lslpp -l | grep iconv', BTW, the README.aix file
in the latest perl
distribution is a great help for those who need to do this and are not
expert AIX
sysadmins); anyway, that didn't help either. Does anyone know of any other
related packages
to update?

I tried configuring with '--without-iconv' but that gets ignored in
apr-util. I see there's
an apr-iconv project in process which I may try if I can figure out how to
plug it in
to apr-util.

patches work with '-p 6' from the subversion-r3200 directory.

*** /cvs/src/tst/orig/subversion-r3200/subversion/libsvn_subr/io.c
2002-09-20 13:52:55.000000000 -0700
--- /cvs/src/tst/patched/subversion-r3200/subversion/libsvn_subr/io.c
2002-10-17 09:41:07.000000000 -0700
***************
*** 528,534 ****
          (apr_err, 0, NULL, pool,
           "svn_io_file_checksum: error reading from '%s'", file);
  
! apr_md5_update (&context, buf, len);
  
    } while (! APR_STATUS_IS_EOF(apr_err));
  
--- 528,534 ----
          (apr_err, 0, NULL, pool,
           "svn_io_file_checksum: error reading from '%s'", file);
  
! apr_md5_update (&context, (const unsigned char *) buf, len);
  
    } while (! APR_STATUS_IS_EOF(apr_err));
  
***************
*** 539,545 ****
         "svn_io_file_checksum: error closing '%s'", file);
  
    apr_md5_final (digest, &context);
! md5str = svn_stringbuf_ncreate (digest, MD5_DIGESTSIZE, pool);
    *checksum_p = svn_base64_encode_string (md5str, pool);
    
    /* ### Our base64-encoding routines append a final newline if any
--- 539,545 ----
         "svn_io_file_checksum: error closing '%s'", file);
  
    apr_md5_final (digest, &context);
! md5str = svn_stringbuf_ncreate ((const char *) digest, MD5_DIGESTSIZE,
pool);
    *checksum_p = svn_base64_encode_string (md5str, pool);
    
    /* ### Our base64-encoding routines append a final newline if any
*** /cvs/src/tst/orig/subversion-r3200/subversion/libsvn_subr/quoprint.c
2002-09-20 13:52:56.000000000 -0700
--- /cvs/src/tst/patched/subversion-r3200/subversion/libsvn_subr/quoprint.c
2002-10-17 09:44:16.000000000 -0700
***************
*** 213,219 ****
          {
            /* Literal character; append it if it's valid as such. */
            if (VALID_LITERAL(*inbuf))
! svn_stringbuf_appendbytes (str, inbuf, 1);
            *inbuflen = 0;
          }
        else if (*inbuf == '=' && *inbuflen == 2 && inbuf[1] == '\n')
--- 213,219 ----
          {
            /* Literal character; append it if it's valid as such. */
            if (VALID_LITERAL(*inbuf))
! svn_stringbuf_appendbytes (str, (const char *) inbuf, 1);
            *inbuflen = 0;
          }
        else if (*inbuf == '=' && *inbuflen == 2 && inbuf[1] == '\n')
***************
*** 250,256 ****
    /* Decode this block of data. */
    subpool = svn_pool_create (db->pool);
    decoded = svn_stringbuf_create ("", subpool);
! decode_bytes (decoded, data, *len, db->buf, &db->buflen);
  
    /* Write the output, clean up, go home. */
    declen = decoded->len;
--- 250,256 ----
    /* Decode this block of data. */
    subpool = svn_pool_create (db->pool);
    decoded = svn_stringbuf_create ("", subpool);
! decode_bytes (decoded, data, *len, (unsigned char *) db->buf,
&db->buflen);
  
    /* Write the output, clean up, go home. */
    declen = decoded->len;
*** /cvs/src/tst/orig/subversion-r3200/subversion/libsvn_subr/svn_base64.c
2002-09-20 13:52:56.000000000 -0700

---
/cvs/src/tst/patched/subversion-r3200/subversion/libsvn_subr/svn_base64.c
2002-10-17 09:47:34.000000000 -0700
***************
*** 130,136 ****
    svn_error_t *err = SVN_NO_ERROR;
  
    /* Encode this block of data and write it out.  */
!   encode_bytes (encoded, data, *len, eb->buf, &eb->buflen, &eb->linelen);
    enclen = encoded->len;
    if (enclen != 0)
      err = svn_stream_write (eb->output, encoded->data, &enclen);
--- 130,137 ----
    svn_error_t *err = SVN_NO_ERROR;
  
    /* Encode this block of data and write it out.  */
!   encode_bytes (encoded, data, *len, (unsigned char *) eb->buf,
!                 &eb->buflen, &eb->linelen);
    enclen = encoded->len;
    if (enclen != 0)
      err = svn_stream_write (eb->output, encoded->data, &enclen);
***************
*** 187,193 ****
    char ingroup[3];
    int ingrouplen = 0, linelen = 0;
  
!   encode_bytes (encoded, str->data, str->len, ingroup, &ingrouplen,
&linelen);
    encode_partial_group (encoded, ingroup, ingrouplen, linelen);
    return encoded;
  }
--- 188,195 ----
    char ingroup[3];
    int ingrouplen = 0, linelen = 0;
  
!   encode_bytes (encoded, str->data, str->len, (unsigned char *) ingroup,
!     &ingrouplen, &linelen);
    encode_partial_group (encoded, ingroup, ingrouplen, linelen);
    return encoded;
  }
*** /cvs/src/tst/orig/subversion-r3200/subversion/tests/libsvn_fs/fs-test.c
2002-09-20 13:52:28.000000000 -0700
---
/cvs/src/tst/patched/subversion-r3200/subversion/tests/libsvn_fs/fs-test.c
2002-10-17 10:01:03.000000000 -0700
***************
*** 4312,4318 ****
        SVN_ERR (svn_stream_read (stream, buf, &len));
        
        /* Update the MD5 calculation with the data we just read.  */
!       apr_md5_update (&context, buf, len);
        
      } while (len == buf_size);  /* Continue until a short read. */
  
--- 4312,4318 ----
        SVN_ERR (svn_stream_read (stream, buf, &len));
        
        /* Update the MD5 calculation with the data we just read.  */
!       apr_md5_update (&context, (const unsigned char *) buf, len);
        
      } while (len == buf_size);  /* Continue until a short read. */
  
***************
*** 4421,4427 ****
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    SVN_ERR (svn_fs_make_file (txn_root, "bigfile", subpool));
    random_data_to_buffer (content_buffer, filesize, TRUE, seed);
!   apr_md5 (digest, contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
--- 4421,4427 ----
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    SVN_ERR (svn_fs_make_file (txn_root, "bigfile", subpool));
    random_data_to_buffer (content_buffer, filesize, TRUE, seed);
!   apr_md5 (digest, (const unsigned char *) contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
***************
*** 4435,4441 ****
    SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer, 20, TRUE, seed);
!   apr_md5 (digest, contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
--- 4435,4441 ----
    SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer, 20, TRUE, seed);
!   apr_md5 (digest, (const unsigned char *) contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
***************
*** 4448,4454 ****
    SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer + (filesize - 20), 20, TRUE,
seed);
!   apr_md5 (digest, contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
--- 4448,4454 ----
    SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer + (filesize - 20), 20, TRUE,
seed);
!   apr_md5 (digest, (const unsigned char *) contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
***************
*** 4463,4469 ****
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer, 20, TRUE, seed);
    random_data_to_buffer (content_buffer + (filesize - 20), 20, TRUE,
seed);
!   apr_md5 (digest, contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
--- 4463,4469 ----
    SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
    random_data_to_buffer (content_buffer, 20, TRUE, seed);
    random_data_to_buffer (content_buffer + (filesize - 20), 20, TRUE,
seed);
!   apr_md5 (digest, (const unsigned char *) contents.data, contents.len);
    SVN_ERR (svn_fs_apply_textdelta 
             (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
    SVN_ERR (svn_txdelta_send_string (&contents, wh_func, wh_baton,
subpool));
***************
*** 4480,4486 ****
        SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
        SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
        random_data_to_buffer (content_buffer, filesize, FALSE, seed);
!       apr_md5 (digest, contents.data, contents.len);
        SVN_ERR (svn_fs_apply_textdelta 
                 (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
        SVN_ERR (svn_txdelta_send_string 
--- 4480,4486 ----
        SVN_ERR (svn_fs_begin_txn (&txn, fs, youngest_rev, subpool));
        SVN_ERR (svn_fs_txn_root (&txn_root, txn, subpool));
        random_data_to_buffer (content_buffer, filesize, FALSE, seed);
!       apr_md5 (digest, (const unsigned char *) contents.data,
contents.len);
        SVN_ERR (svn_fs_apply_textdelta 
                 (&wh_func, &wh_baton, txn_root, "bigfile", subpool));
        SVN_ERR (svn_txdelta_send_string 
***
/cvs/src/tst/orig/subversion-r3200/subversion/tests/libsvn_repos/md5args.c
2002-09-20 13:52:17.000000000 -0700
---
/cvs/src/tst/patched/subversion-r3200/subversion/tests/libsvn_repos/md5args.
c	2002-10-17 09:55:51.000000000 -0700
***************
*** 97,103 ****
    printf ("args=%s\n", string->data);
  
    /* Now, run the MD5 digest calculation on that string. */
!   apr_md5 (digest, string->data, string->len);
    digest_str = svn_stringbuf_create ("", pool);
    for (i = 0; i < MD5_DIGESTSIZE; i++)
      {
--- 97,103 ----
    printf ("args=%s\n", string->data);
  
    /* Now, run the MD5 digest calculation on that string. */
!   apr_md5 (digest, (const unsigned char *) string->data, string->len);
    digest_str = svn_stringbuf_create ("", pool);
    for (i = 0; i < MD5_DIGESTSIZE; i++)
      {
*** /cvs/src/tst/orig/subversion-r3200/subversion/libsvn_delta/diff_file.c
2002-09-20 13:52:10.000000000 -0700
---
/cvs/src/tst/patched/subversion-r3200/subversion/libsvn_delta/diff_file.c
2002-10-17 09:49:24.000000000 -0700
***************
*** 173,179 ****
                
                file_token->length += len;
                length -= len;
!               apr_md5_update(&md5_ctx, curp, len);
  
                file_baton->curp[idx] = eol;
                file_baton->length[idx] = length;
--- 173,179 ----
                
                file_token->length += len;
                length -= len;
!               apr_md5_update(&md5_ctx, (const unsigned char *) curp, len);
  
                file_baton->curp[idx] = eol;
                file_baton->length[idx] = length;
***************
*** 183,189 ****
              }
  
            file_token->length += length;
!           apr_md5_update(&md5_ctx, curp, length);
          }
  
        file_baton->length[idx] = 0;
--- 183,189 ----
              }
  
            file_token->length += length;
!           apr_md5_update(&md5_ctx, (const unsigned char *) curp, length);
          }
  
        file_baton->length[idx] = 0;
*** /cvs/src/tst/orig/subversion-r3200/subversion/libsvn_delta/text_delta.c
2002-09-20 13:52:11.000000000 -0700
---
/cvs/src/tst/patched/subversion-r3200/subversion/libsvn_delta/text_delta.c
2002-10-17 09:50:34.000000000 -0700
***************
*** 282,288 ****
           APR_SUCCESS.  As such, we are proposing to the APR folks that
           its interface change to be a void function.  In the meantime,
           we'll simply ignore the return value. */
!       apr_md5_update (&(stream->context), stream->buf, source_len);
  
        /* Read the target stream. */
        if (err == SVN_NO_ERROR)
--- 282,289 ----
           APR_SUCCESS.  As such, we are proposing to the APR folks that
           its interface change to be a void function.  In the meantime,
           we'll simply ignore the return value. */
!       apr_md5_update (&(stream->context), (const unsigned char *)
stream->buf,
!                       source_len);
  
        /* Read the target stream. */
        if (err == SVN_NO_ERROR)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Oct 18 21:16:57 2002

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.