Checking if a system is ELF

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: pgsql-hackers(at)PostgreSQL(dot)org
Subject: Checking if a system is ELF
Date: 1999-07-27 21:58:33
Message-ID: m119FF4-0000cIC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Todd Vierling (tv(at)pobox(dot)com) suggested the following test for ELFness.
Seems pretty portable to me.

Thus spake Todd Vierling (tv(at)pobox(dot)com)
>On NetBSD, the following will do it. This may even be platform independednt
>if "grep -q" is replaced by "grep >/dev/null 2>&1".
>
>if echo __ELF__ | ${CC} -E - | grep -q __ELF__; then
> ... a.out action ...
>else
> ... ELF action ...
>fi

--
D'Arcy J.M. Cain <darcy(at){druid|vex}.net> | Democracy is three wolves
http://www.druid.net/darcy/ | and a sheep voting on
+1 416 424 2871 (DoD#0082) (eNTP) | what's for dinner.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hub.Org News Admin 1999-07-27 21:59:17
Previous Message Vince Vielhaber 1999-07-27 21:20:54 Re: [CORE] Re: [Keystone Slip # 22] Some confusion with datetime