Re: __attribute__ for non-gcc compilers - Mailing list pgsql-hackers

From Oskari Saarenmaa
Subject Re: __attribute__ for non-gcc compilers
Date
Msg-id 54E34C19.1070603@ohmu.fi
Whole thread Raw
In response to Re: __attribute__ for non-gcc compilers  (Andres Freund <andres@2ndquadrant.com>)
List pgsql-hackers
17.02.2015, 15:46, Andres Freund kirjoitti:
> On 2015-02-17 15:41:45 +0200, Oskari Saarenmaa wrote:
>> 15.01.2015, 21:58, Robert Haas kirjoitti:
>>> On Wed, Jan 14, 2015 at 5:54 PM, Andres Freund <andres@2ndquadrant.com> wrote:
>>>> I think I'd for now simply not define pg_attribute_aligned() on
>>>> platforms where it's not supported, instead of defining it empty. If we
>>>> need a softer variant we can name it pg_attribute_aligned_if_possible or
>>>> something.
>>>>
>>>> Sounds sane?
>>>
>>> Yes, that sounds like a much better plan.
>>
>> Attached an updated patch rebased on today's git master that never
>> defines aligned or packed empty.
> 
> Cool, that looks good. Besides allowing other compilers to use the
> __attribute__ stuff, it also seems like a readability win to
> me. Especially the various printf stuff looks much better to me this
> way.
> 
> I guess you've tested this on solaris and x86 linux?

Yeah, tested on x86-64 Linux using gcc version 4.9.2 20150212 (Red Hat
4.9.2-6) and on Solaris 10 using Sun C 5.12 SunOS_sparc.

/ Oskari



pgsql-hackers by date:

Previous
From: Michael Paquier
Date:
Subject: Re: Table-level log_autovacuum_min_duration
Next
From: Stephen Frost
Date:
Subject: Re: pgaudit - an auditing extension for PostgreSQL