Subject: Re: [HACKERS] Re: More on shared objects problem
To: Mark Hollomon <mhh@nortelnetworks.com>
From: Thilo Manske <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: current-users
Date: 07/27/1999 20:41:08
On Tue, Jul 27, 1999 at 02:35:13PM -0400, Mark Hollomon wrote:
> D'Arcy J.M. Cain wrote:
> > So how do we determine that a system is elf? I don't see it in uname. Do
> > we just run file(1) on the kernel and see if the string "ELF" shows up?
>
> The test I use is to compile a program that opens its own executable
> and checks for the magic number.
Or this:
if echo __ELF__ | ${CC} -E - | grep -q __ELF__; then
# ELF
else
# a.out
fi
This is not my idea, it's from the patches for apache in the package tree.
--
Dies ist Thilos Unix Signature! Viel Spass damit.