fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Patches <pgsql-patches(at)postgresql(dot)org>
Subject: fix build on Solaris 10/x86_64 in 64bit mode with Sun Studio 11
Date: 2007-01-07 11:00:21
Message-ID: 45A0D2C5.1080803@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

on an Intel based Solaris 10U2 box using Sun Studio 11 with
-xarch=generic64 we get a compile time failure in contrib/pgcrypto
because BYTE_ORDER is not defined.

in src/include/port/solaris.h we define it to little endian only for
__i386 - however in 64bit mode the compiler only defines __amd64 causing
YTE_ORDER to be undefined.
The other option would be to use __x86 which is defined on all intel
architectures.

attached is a quick hack to allow pgcrypto to compile on that platform.

Stefan

Attachment Content-Type Size
patch_sol10_amd64.diff text/plain 610 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Shane Ambler 2007-01-07 11:10:10 Erronous sort used in query plan
Previous Message Pavel Stehule 2007-01-07 10:20:56 Re: proposal: catch warnings

Browse pgsql-patches by date

  From Date Subject
Next Message Martijn van Oosterhout 2007-01-07 11:22:32 Re: [HACKERS] SGML index build fix
Previous Message Simon Riggs 2007-01-07 09:12:30 Re: [PATCHES] [Fwd: Index Advisor]