Re: predefined macros for various BSD-based systems?

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: predefined macros for various BSD-based systems?
Date: 2010-05-15 10:16:16
Message-ID: 201005151016.o4FAGGF06079@momjian.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> I'm not even too sure what "bsdi" is, but I'm suspicious of that branch
> too. A search of our code finds
>
> contrib/pg_upgrade/file.c: 248: #elif defined(freebsd) || defined(bsdi) || defined(__darwin__) || defined(openbsd)
> src/backend/utils/misc/ps_status.c: 67: #elif (defined(BSD) || defined(__bsdi__) || defined(__hurd__)) && !defined(__darwin__)
> src/include/port.h: 355: #if defined(bsdi) || defined(netbsd)
> src/port/fseeko.c: 20: #if defined(__bsdi__) || defined(__NetBSD__)
> src/port/fseeko.c: 24: #ifdef bsdi
> src/port/fseeko.c: 47: #ifdef bsdi
> src/port/fseeko.c: 55: #ifdef bsdi
> src/port/fseeko.c: 66: #ifdef bsdi
> src/port/fseeko.c: 76: #ifdef bsdi
> src/port/fseeko.c: 87: #ifdef bsdi
>
> which leaves one with not a lot of warm fuzzies that we know how to
> spell the symbol for either bsdi or netbsd. (Oh, and shouldn't
> this pg_upgrade check be looking for netbsd too?)

BSDi defines "bsdi" and "__bsdi__", but our code was clearly
inconsistent. I have changed all references to __bsdi__.

FYI, src/tools/ccsym will show you your predefined symbols.

--
Bruce Momjian <bruce(at)momjian(dot)us> http://momjian.us
EnterpriseDB http://enterprisedb.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2010-05-15 10:22:08 Re: predefined macros for various BSD-based systems?
Previous Message Andrew Dunstan 2010-05-15 10:14:50 Re: predefined macros for various BSD-based systems?