This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: Implemented C and T modifiers for ar
- To: roman dot hodek at caldera dot de
- Subject: Re: Implemented C and T modifiers for ar
- From: Nick Clifton <nickc at cambridge dot redhat dot com>
- Date: 26 Oct 2001 12:55:41 +0100
- Cc: binutils at sourceware dot cygnus dot com
- References: <200110241131.f9OBVPN01773@jeswick.caldera.de>
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