This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Implemented C and T modifiers for ar


Hi Roman,

> We noticed that the LSB spec requires 'C' and 'T' modifiers for ar, 
> which it imports from SUS.

What are LSB and SUS ?

> Appended below is a patch for binutils-2.11.92.0.10.

Do you have a copyright assignment on file with the FSF ?  Without
such an assignment we are unable to accept you patch :-(

A couple of comments on the patch itself:

> @item T
> Allow to truncate names of extracted files so they fit the maximum
> filename length of the target filesystem.  Without the @samp{T}
> modifier, a file with a name that is too long is an error. A
> diagnostic message will be printed and the file will not be
> extracted.

I think perhaps this should be reworded as:

 @item T
 Allow @command{ar} to truncate names of extracted files so they fit
 the maximum filename length of the target filesystem.  Without the
 @samp{T} modifier, an attempt to extract a file with a name that is
 too long will generate a diagnostic message and the file will remain
 in the

> +  fd = open (name, O_WRONLY|O_CREAT|O_TRUNC | (do_not_overwrite ? O_EXCL : 0),
> +	     S_IRWXU|S_IRWXG|S_IRWXO);
> +  if (fd < 0)
> +    {
> +      perror (name);
> +      xexit (1);
> +    }
> +  output_filename = name; 
> +  
> +  ostream = fdopen (fd, FOPEN_WB);

Not all systems support fdopen.  You need to add configure support for
this.  Have a look at opncls.c, config.in and configure.in in the BFD
directory for an example of how to do this.

Cheers
        Nick


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]