Re: [HACKERS] PostgreSQL supported platform report and a patch.

From: "Billy G(dot) Allie" <bga(at)mug(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-ports(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [HACKERS] PostgreSQL supported platform report and a patch.
Date: 2002-11-07 06:11:13
Message-ID: 200211070611.gA76BDx06628@bajor.mug.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-ports

Tom Lane wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> > I am fine with this because it only touches unixware-specific stuff,
> > except the change to Tom's inline function:
> > [static] inline Datum
> > myFunctionCall2(FmgrInfo *flinfo, Datum arg1, Datum arg2)
> > Tom will have to comment on that.
>
> That change would actively break some platforms (see C99 inline
> specifications). Why is it necessary for SCO? We certainly have
> plenty of other static inline functions ...
>
> regards, tom lane

Here is the error messages generated during the compile:

cc -K pentium_pro,host,inline,loop_unroll -I../../../../src/include
-I/usr/local/include -I/usr/local/ssl/include -c -o tuplesort.o tuplesort.c
UX:acomp: ERROR: "tuplesort.c", line 1854: "inline" functions cannot use
"static" identifier: myFunctionCall2
UX:acomp: ERROR: "tuplesort.c", line 1856: "inline" functions cannot use
"static" identifier: myFunctionCall2
UX:acomp: ERROR: "tuplesort.c", line 1870: "inline" functions cannot use
"static" identifier: myFunctionCall2
UX:acomp: ERROR: "tuplesort.c", line 1872: "inline" functions cannot use
"static" identifier: myFunctionCall2
UX:acomp: ERROR: "tuplesort.c", line 1885: "inline" functions cannot use
"static" identifier: myFunctionCall2
UX:acomp: ERROR: "tuplesort.c", line 1897: "inline" functions cannot use
"static" identifier: myFunctionCall2
gmake[4]: *** [tuplesort.o] Error 1

The problem only occurs in tuplesort.c. It does not occur in pg_lzcompress.c
or aset.c, which are the only other source files that contain static inline
function definitions that get compiled. The rest are IF DEFed out.

I think the problem is that myFunctionCall2 is called by a non-static inline
function, ApplySortFunction. If I make ApplySortFunction static, it compiles
(but break the link phase). If I remove the inline from ApplySortFunction, it
compiles and builds. In order for tuplesort.c to compile on OpenUNIX the code
must be changed to either:

1. Remove the static modifier from myFuntionCall2
or
2. Remove the inline from ApplySortFunction
or
3. Wrap the static modifier for myFunctionCall2 with an IF DEF so it's not
there when USE_UNIVEL_CC is defined.

I think that option 2 is the best choice, but it's your call.
--
____ | Billy G. Allie | Domain....: Bill(dot)Allie(at)mug(dot)org
| /| | 7436 Hartwell | MSN.......: B_G_Allie(at)email(dot)msn(dot)com
|-/-|----- | Dearborn, MI 48126|
|/ |LLIE | (313) 582-1540 |

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-11-07 06:16:08 Re: [HACKERS] PostgreSQL supported platform report and a patch.
Previous Message Tom Lane 2002-11-07 06:08:56 Re: 7.3b5 contrib compile problem

Browse pgsql-ports by date

  From Date Subject
Next Message Tom Lane 2002-11-07 06:16:08 Re: [HACKERS] PostgreSQL supported platform report and a patch.
Previous Message Larry Rosenman 2002-11-07 05:27:31 Re: [HACKERS] PostgreSQL supported platform report and a patch.