Re: UW 713UP3 patch - Mailing list pgsql-patches

From Tom Lane
Subject Re: UW 713UP3 patch
Date
Msg-id 5479.1067815046@sss.pgh.pa.us
Whole thread Raw
In response to Re: UW 713UP3 patch  (Larry Rosenman <ler@lerctr.org>)
Responses Re: UW 713UP3 patch  (Larry Rosenman <ler@lerctr.org>)
List pgsql-patches
Larry Rosenman <ler@lerctr.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

pgsql-patches by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: UW 713UP3 patch
Next
From: Larry Rosenman
Date:
Subject: Re: UW 713UP3 patch