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

Re: apr_off_t is of an ambiguous size.

From: Greg Hudson <ghudson_at_MIT.EDU>
Date: 2004-01-18 00:08:29 CET

On Sat, 2004-01-17 at 17:39, Ben Reser wrote:
> svn_error_t *
> svn_io_file_seek (apr_file_t *file, apr_seek_where_t where,
> svn_offset_t *offset, apr_pool_t *pool)
> {
> /* Because apr_off_t may not be the same size as svn_offset_t we need
> * to do bounds checking to make sure it will fit. The typecasted
> * comparisions do that for us. */
> if ((apr_off_t) *offset == *offset )
> {
> apr_off_t apr_offset = (apr_off_t) *offset;
> apr_status_t status;
> status = apr_file_seek (file, where, &apr_offset);
> if ((svn_offset_t) apr_offset == apr_offset)
> {

I think I'd rather we just hide our heads in the sand and assume that
svn_offset_t is at least as big as apr_off_t. If we ever run into
128-bit apr_off_t values and people want to use >64-bit offsets, we're
in more trouble than we can really solve with a bounds check here.

To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Jan 18 00:09:14 2004

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.