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

Поиск
Список
Период
Сортировка
От Billy G. Allie
Тема Re: [HACKERS] PostgreSQL supported platform report and a patch.
Дата
Msg-id 200211070611.gA76BDx06628@bajor.mug.org
обсуждение исходный текст
Ответ на Re: [HACKERS] PostgreSQL supported platform report and a patch.  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-ports
Tom Lane wrote:
> Bruce Momjian <pgman@candle.pha.pa.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.Allie@mug.org
|  /|      | 7436 Hartwell     | MSN.......: B_G_Allie@email.msn.com
|-/-|----- | Dearborn, MI 48126|
|/  |LLIE  | (313) 582-1540    |



Вложения

В списке pgsql-ports по дате отправления:

Предыдущее
От: Olivier PRENANT
Дата:
Сообщение: Re: [HACKERS] PostgreSQL supported platform report and a
Следующее
От: mathan_yem@rediffmail.com (mathan)
Дата:
Сообщение: Make 7.1.3under HP-UX 11.22