Re: UW 713UP3 patch

From: Larry Rosenman <ler(at)lerctr(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: UW 713UP3 patch
Date: 2003-11-02 23:40:45
Message-ID: 191000000.1067816445@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

--On Sunday, November 02, 2003 17:23:59 -0600 Larry Rosenman
<ler(at)lerctr(dot)org> wrote:

>
>
> --On Sunday, November 02, 2003 18:17:26 -0500 Tom Lane
> <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
>> Larry Rosenman <ler(at)lerctr(dot)org> writes:
>>> +# version check for the 7.1.3UP3 compiler (version 401200310):
>>> +cat >conftest.c <<__EOF__
>>> +int main(int argc, char **argv)
>>> +#if __SCO_VERSION__ >=3D 401200310
>>> +#error good compiler
>>> +#else
>>> +#error bad compiler
>>> +#endif
>>> +__EOF__
>>> + $CC conftest.c 2>conftest.err 1>&2
>>> + grep -q good conftest.err
>>> + if test $? =3D 0; then
>>> + CFLAGS=3D"-O -Kinline"
>>> + else
>>> + CFLAGS=3D"-O -Kinline,no_host"
>>> + fi
>>
>> Couldn't this be simplified to
>>
>> +cat >conftest.c <<__EOF__
>> +int main(int argc, char **argv)
>> +{
>> +#if __SCO_VERSION__ < 401200310
>> +#error bad compiler
>> +#endif
>> +}
>> +__EOF__
>> + $CC conftest.c >/dev/null 2>&1
>> + if test $? = 0; then
>> + CFLAGS="-O -Kinline"
>> + else
>> + CFLAGS="-O -Kinline,no_host"
>> + fi
>>
>> regards, tom lane
> How about this? ( I needed to make it valid C):
OOOPPPSS. Yes, Tom, yours will work just fine.

I missed the fact that you put the #if inside the braces.

--
Larry Rosenman http://www.lerctr.org/~ler
Phone: +1 972-414-9812 E-Mail: ler(at)lerctr(dot)org
US Mail: 1905 Steamboat Springs Drive, Garland, TX 75044-6749

In response to

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2003-11-03 03:53:55 Re: "make check" improvement for cygwin
Previous Message Larry Rosenman 2003-11-02 23:23:58 Re: UW 713UP3 patch