Re: [HACKERS] Checking if a system is ELF

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Cc: reedstrm(at)wallace(dot)ece(dot)rice(dot)edu (Ross J(dot) Reedstrom)
Subject: Re: [HACKERS] Checking if a system is ELF
Date: 1999-07-28 13:50:31
Message-ID: 9660.933169831@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"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?

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

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 1999-07-28 14:16:47 Re: Selectivity of "=" (Re: [HACKERS] Index not used on simple se lect)
Previous Message Philip Warner 1999-07-28 12:33:32 Re: [HACKERS] Arbitrary tuple size