Re: build of 7.2.1 on SCO Openserver and Unixware 7.1.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: Nicolas Bazin <nbazin(at)ingenico(dot)com(dot)au>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: build of 7.2.1 on SCO Openserver and Unixware 7.1.1
Date: 2002-03-27 15:30:06
Message-ID: 18870.1017243006@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Yes, the patch replaces pow(8,*) with a lookup table of 4 8^X values.
> So SCO provides a library you can't link to? Or you can't mix *.so
> libraries and static *.a libraries? I am inclined ot add this patch to
> the doc/FAQ_SCO file. We really try to avoid major code uglyness to
> work around operating system things that should work on their own.

Actually, the existing coding in odbc is just plain stupid: why are we
using a transcendental function call to emulate an integer shift?
Even the table-based implementation that Nicolas proposed is doing it
the hard way. Try converting, eg,

for (i = 1; i <= 3; i++)
y += (s[i] - 48) * (int) pow(8, 3 - i);

to

for (i = 1; i <= 3; i++)
y += (s[i] - '0') << (3 * (3 - i));

and you can get the patch accepted just on efficiency and readability
grounds, never mind whether it avoids SCO library breakage.

>> The TCL stuff is because Caldera distribution of TCL is compiled with their
>> compiler. If you happen to use another compiler on your platform (gcc) it
>> doesn't work anymore. Caldera compiler has -belf -Kpic options which are
>> fully incompatible with gcc. That's why I though best to leave the TCL
>> packages been compiled with the compiler used for postgresql.

We've been around on this a couple of times now; the current theory is
that we should stop using the TCL-supplied switches altogether. There
is a patch in the works to change libpgtcl and pltcl to be built the
same way we build everything else in the distribution.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2002-03-27 16:06:26 Re: compile bug in HEAD?
Previous Message Thomas Sandford 2002-03-27 15:21:08 Quotes and functions

Browse pgsql-patches by date

  From Date Subject
Next Message Christopher Masto 2002-03-27 21:30:31 Re: psql slash command '\G'
Previous Message Nicolas Bazin 2002-03-27 12:08:23 Re: build of 7.2.1 on SCO Openserver and Unixware 7.1.1