PATCH: Avoid use of __attribute__ when building with old Sun compiler versions

From: Andy Grundman <andyg(at)activestate(dot)com>
To: pgsql-hackers(at)postgresql(dot)org
Subject: PATCH: Avoid use of __attribute__ when building with old Sun compiler versions
Date: 2016-09-02 15:55:31
Message-ID: CAPjXLdGvomgzPYcKuRukR7u2D7w8tEykwcPQAAOQAfTGckGXfg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

The use of __attribute__ is currently enabled by checking for
__SUNPRO_C. However, this compiler only added support for
__attribute__ keywords in version 5.10 [1]. This patch adds a version
check to only enable this for supported versions [2].

I have tested this with Sun C 5.8 on a Solaris 9 SPARC system,
building 9.5.4 (+OpenSSL 1.1.0 patches).

[1] Compiler features by release:
http://www.oracle.com/technetwork/systems/cccompare-137792.html
[2] Pre-defined compiler macros:
https://sourceforge.net/p/predef/wiki/Compilers/#oracle-solaris-studio

Thanks,
--
Andy Grundman // andyg(at)activestate(dot)com

Attachment Content-Type Size
0001-Don-t-use-__attribute__-for-old-Sun-C-versions.patch application/octet-stream 1.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Kevin Grittner 2016-09-02 15:58:59 Re: Implement targetlist SRFs using ROWS FROM() (was Changed SRF in targetlist handling)
Previous Message Aleksander Alekseev 2016-09-02 15:49:17 Re: Re: PROPOSAL: make PostgreSQL sanitizers-friendly (and prevent information disclosure)