On 10/30/07, jean-frederic clere <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
> > Author: trawick
> > Date: Mon Oct 29 13:36:08 2007
> > New Revision: 589846
> >
> > URL: http://svn.apache.org/viewvc?rev=589846&view=rev
> > Log:
> > AIX C compiler won't add to void * in picky mode
>
> It seems I also had problems on HP-UX:
> +++
> if (amt) {
> <<<<<<< .mine
> /* rv = apr_file_write_full(thefile, vec[i].iov_base + amt, */
> void *ptr = vec[i].iov_base;
> ptr = ptr + amt;
> rv = apr_file_write_full(thefile, ptr,
> =======
does the C standard allow void* arithmetics?
won't this compile for you:
const char *ptr = (const char*) vec[i].iov_base;
ptr = ptr + amt;
rv = apr_file_write_full(thefile, ptr,
?
> rv = apr_file_write_full(thefile, (const char *)vec[i].iov_base
> + amt,
> >>>>>>> .r589986
> vec[i].iov_len - amt, NULL);
> }
> +++
>
> >
> > Modified:
> > apr/apr/trunk/file_io/unix/fullrw.c
> >
> > Modified: apr/apr/trunk/file_io/unix/fullrw.c
> > URL:
> > http://svn.apache.org/viewvc/apr/apr/trunk/file_io/unix/fullrw.c?rev=589846&r1=589845&r2=589846&view=diff
> > ==============================================================================
> > --- apr/apr/trunk/file_io/unix/fullrw.c (original)
> > +++ apr/apr/trunk/file_io/unix/fullrw.c Mon Oct 29 13:36:08 2007
> > @@ -95,7 +95,7 @@
> > }
> >
> > if (amt) {
> > - rv = apr_file_write_full(thefile, vec[i].iov_base + amt,
> > + rv = apr_file_write_full(thefile, (const char *)vec[i].iov_base +
> > amt,
> > vec[i].iov_len - amt, NULL);
> > }
> >
> >
> >
> >
>
>
--
Lucian