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:23:58
Message-ID: 172550000.1067815438@lerlaptop.lerctr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

--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):

Index: src/template/unixware
===================================================================
RCS file: /projects/cvsroot/pgsql-server/src/template/unixware,v
retrieving revision 1.27
diff -u -r1.27 unixware
--- src/template/unixware 25 Oct 2003 15:32:11 -0000 1.27
+++ src/template/unixware 2 Nov 2003 23:22:21 -0000
@@ -1,13 +1,27 @@
if test "$GCC" = yes; then
THREAD_CPPFLAGS="-pthread"
else
-# the -Kno_host is temporary for a bug in the compiler. See -hackers
+# the -Kno_host is for a bug in the compiler. See -hackers
# discussion on 7-8/Aug/2003.
-# when the 7.1.3UP3 or later compiler is out, we can do a version check.
- CFLAGS="-O -Kinline,no_host"
+# version check for the 7.1.3UP3 compiler (version 401200310):
+cat >conftest.c <<__EOF__
+#if __SCO_VERSION__ < 401200310
+#error bad compiler
+#endif
+int main(int argc,char **argv)
+{
+}
+
+__EOF__
+ $CC conftest.c >/dev/null 2>&1
+ if test $? = 0; then
+ CFLAGS="-O -Kinline"
+ else
+ CFLAGS="-O -Kinline,no_host"
+ fi
+ rm conftest.*
THREAD_CPPFLAGS="-K pthread"
fi
-
THREAD_SUPPORT=yes
NEED_REENTRANT_FUNCS=no # verified 7.1.3 2003-09-03
THREAD_CPPFLAGS="$THREAD_CPPFLAGS -D_REENTRANT"

--
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

Attachment Content-Type Size
unixware.up3.patch3 application/octet-stream 1.2 KB

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Larry Rosenman 2003-11-02 23:40:45 Re: UW 713UP3 patch
Previous Message Tom Lane 2003-11-02 23:17:26 Re: UW 713UP3 patch