This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't use tail +NNN
On Oct 5, 2005, "Maciej W. Rozycki" <macro@linux-mips.org> wrote:
> On Wed, 5 Oct 2005, Paolo Bonzini wrote:
>> > That said, since we haven't ever got a report about problems with tail
>> > +16c, we might use that if it works, try -c +16 otherwise (or the
>> > other way round, since -c +16 is POSIX standard), and fallback to dd
>> > as a last resort.
>>
>> I'd rather not even fall back to dd. We'd already have cmp
>> --ignore-initial=16, cmp FILE1 FILE2 16 16, tail -c +16, tail +16c... I guess
>> that's more than enough.
> Note that "coreutils" have been fixed, so perhaps we should simply
> declare it a bug in the affected revisions of the package? A `configure'
> test might be useful to warn people of problematic implementations.
Sounds like a reasonable approach.
Although I don't see that it would be hard at all to get a
configure-set Makefile macro that expands to a command that copies a
file except for the first 16 bytes, and use that macro in the
Makefiles. Then it would be easy to handle the two tail variations,
and introduce dd if we ever had to.
--
Alexandre Oliva http://www.lsd.ic.unicamp.br/~oliva/
Red Hat Compiler Engineer aoliva@{redhat.com, gcc.gnu.org}
Free Software Evangelist oliva@{lsd.ic.unicamp.br, gnu.org}