On Thu, Feb 25, 2010 at 12:45:39PM +0100, Denis Excoffier wrote: >> On Thu, Feb 25, 2010 at 10:57:42AM +0200, Sergey Poznyakoff wrote: >> >> Hi Denis, >> >> >> >> > tar: rmtlseek not stopped at a record boundary >> >> > tar: Error is not recoverable: exiting now >> >> >> >> I could not reproduce thise. Please give more info about >> >> the system you are using and options used to compile tar >> >> (I'd appreciate if you sent me your config.log file) >> >> >> >> > In src/buffer.c, replace (around line 863): >> >> > if (size < record_size) >> >> > with >> >> > if (size < (off_t)record_size) >> >> >> >> Strange, this is a no-op: operands are promoted to the wider type (which >> >> in this case is off_t) by default. >> >> >> On (my) Solaris 8 (i presume it is the same on Solaris 10): >> - size is off_t which is `long', with sizeof 4; and >> - record_size is size_t which is `unsigned long', with sizeof also 4. >> Hence the promotion with negatives off_t's, and the non-execution of the >> `return 0'. The cast forces the comparison to remain at a signed level.
Oops! Both sizeof's are 8 instead of 4 (but this does not change the conclusion). On Solaris, sizeof(long) is 8. Sorry for the noise. Denis Excoffier. The information in this e-mail is confidential. The contents may not be disclosed or used by anyone other than the addressee. Access to this e-mail by anyone else is unauthorised. If you are not the intended recipient, please notify Airbus immediately and delete this e-mail. Airbus cannot accept any responsibility for the accuracy or completeness of this e-mail as it has been sent over public networks. If you have any concerns over the content of this message or its Accuracy or Integrity, please contact Airbus immediately. All outgoing e-mails from Airbus are checked using regularly updated virus scanning software but you should take whatever measures you deem to be appropriate to ensure that this message and any attachments are virus free.
