Re: __cpu__ defines

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: __cpu__ defines
Date: 2003-09-12 14:59:31
Message-ID: 200309121459.h8CExVS19140@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > As part of my spinlock testing, I noticed that we test for __cpu__ when
> > using gcc, and __cpu when not using gcc.
> > ...
> > So, I wonder if we should be testing _just_ for __cpu, perhaps starting
> > in 7.5.
>
> I might be all wet on this, but I had the idea that the __cpu__ forms
> were considered more standard/common. In any case, I can't see any
> good reason not to test for both. The amount of code saved by checking
> only one is negligible; why should we take a chance on breaking things
> for that?

Yes, that what confuses me --- which is standard. Right now, we aren't
consistent. My patch tests for __cpu__ on gcc, and both on non-gcc,
which seems safest.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Terry Yapt 2003-09-12 15:13:34 PostgreSQL on Novell Netware 6.5.
Previous Message Tom Lane 2003-09-12 14:54:20 Re: __cpu__ defines

Browse pgsql-patches by date

  From Date Subject
Next Message Bruce Momjian 2003-09-12 15:28:48 Re: [PATCHES] Reorganization of spinlock defines
Previous Message Tom Lane 2003-09-12 14:54:20 Re: __cpu__ defines