Checking if a system is ELF - Mailing list pgsql-hackers

From D'Arcy" "J.M." Cain
Subject Checking if a system is ELF
Date
Msg-id m119FF4-0000cIC@druid.net
Whole thread Raw
Responses Re: [HACKERS] Checking if a system is ELF
List pgsql-hackers
Todd Vierling (tv@pobox.com) suggested the following test for ELFness.
Seems pretty portable to me.

Thus spake Todd Vierling (tv@pobox.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@{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.


pgsql-hackers by date:

Previous
From: "Ansley, Michael"
Date:
Subject: RE: [INTERFACES] Late mail
Next
From: "Hub.Org News Admin"
Date:
Subject: ...