Re: [HACKERS] Checking if a system is ELF

From: "D'Arcy" "J(dot)M(dot)" Cain <darcy(at)druid(dot)net>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)postgresql(dot)org, reedstrm(at)wallace(dot)ece(dot)rice(dot)edu
Subject: Re: [HACKERS] Checking if a system is ELF
Date: 1999-07-28 16:16:09
Message-ID: m119WNG-0000cIC@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thus spake Tom Lane
> "D'Arcy" "J.M." Cain <darcy(at)druid(dot)net> writes:
> > So grep will find "__ELF__" in the output on druid proving that it is an
> > a.out system. On smaug, __ELF__ is defined as "1" so grep fails to find
> > the string "__ELF__" proving it to be an ELF system.
>
> Seems to me that this is a test for __ELF__ being defined, but not for
> exactly what it is defined as. Mightn't a non-ELF system define it as 0?

Hard to imagine. Pre-ELF systems wouldn't know about it one way or
another. However, it is certainly a theoretical possibility.

> Also, I think there are prefab test macros in Autoconf for checking
> whether a #define symbol exists ... you shouldn't have to do anything
> as grotty as writing out an explicit test program ...

This is why I didn't send in diffs. I don't know enough about autoconf.
Is anyone looking at this discussion planning to incorporate something?

--
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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Oleg Bartunov 1999-07-28 18:39:58 SYSLOGD facility
Previous Message Philip Warner 1999-07-28 16:11:03 Re: [HACKERS] row reuse while UPDATE and vacuum analyze problem