Re: a.out.h in text-utils/more.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 14 May 2008, Karel Zak wrote:
> On Wed, May 14, 2008 at 12:27:25PM -0400, Mike Frysinger wrote:
> > On Wednesday 14 May 2008, Karel Zak wrote:
> > > On Tue, May 13, 2008 at 10:20:40AM -0400, Mike Frysinger wrote:
> > > > any problems with dropping the a.out.h include in text-utils/more.c
> > > > and replacing the three defines with the actual constants ?  the
> > > > constants are
> > >
> > >  Mike, you forgot to describe advantage of this change :-)
> >
> > portability.  a.out.h is not POSIX and is a historical wart in today's
> > ELF world.  it's also broken for libc's that were relying on the kernel's
> > a.out.h but the kernel is no longer exporting it ... yes, this is a bug
> > on the libc side of things, but if nothing depended on a.out.h in the
> > first place ...
>
>  OK, makes sense. Send a patch.

one last option :)

the comment above this function states:
/*
 * magic --
 *  check for file magic numbers.  This code would best be shared with
 *  the file(1) program or, perhaps, more should not try and be so smart?
 */

perhaps being so smart is kind of pointless ?  after all, we're only handling 
3 a.out types (there are more), 3 magic constants i dont recognize, and 1 elf 
format.  i dont see this function really gaining us anything.

we could use libmagic from the file package, but how terribly useful is that 
even ?
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux