d27f00c vfs-btrfs: Fix build on 32 bit platforms by using long long types

Andrew Bartlett abartlet at samba.org
Tue Mar 26 20:05:38 MDT 2013


On Tue, 2013-03-26 at 21:03 +0100, Christian Ambach wrote:
> > -		DEBUG(5, ("BTRFS_IOC_CLONE_RANGE failed: %s, length %lu, "
> > -			  "src fd: %ld off: %lu, dest fd: %d off: %lu\n",
> > -			  strerror(errno), (long)cr_args.src_length,
> > -			  (long)cr_args.src_fd, (long)cr_args.src_offset,
> > -			  dest_fsp->fh->fd, (long)cr_args.dest_offset));
> > +		DEBUG(5, ("BTRFS_IOC_CLONE_RANGE failed: %s, length %llu, "
> > +			  "src fd: %lld off: %llu, dest fd: %d off: %llu\n",
> > +			  strerror(errno),
> > +			  (unsigned long long)cr_args.src_length,
> > +			  (long long)cr_args.src_fd,
> > +			  (unsigned long long)cr_args.src_offset,
> > +			  dest_fsp->fh->fd,
> > +			  (unsigned long long)cr_args.dest_offset));
> >   		cc_state->subreq = SMB_VFS_NEXT_COPY_CHUNK_SEND(handle,
> >   								cc_state, ev,
> 
> 
> Wouldn't it be possible to use the PRIu64 and PRIi64 macros that C99
> defines? That would remove all the casts and IMHO make it easier to read
> the code.
> Or do you we have platforms we want to run on that don't have proper C99
> support?

For me, the main reason I've not used those is that they are *ugly*
(even uglier than the casts).  I'm not sure if we have the macros in
libreplace etc, I've not looked...

Andrew Bartlett

-- 
Andrew Bartlett                                http://samba.org/~abartlet/
Authentication Developer, Samba Team           http://samba.org




More information about the samba-technical mailing list