Tom Lane wrote:
> Bruce Momjian <[EMAIL PROTECTED]> 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....: [EMAIL PROTECTED]
|  /|      | 7436 Hartwell     | MSN.......: [EMAIL PROTECTED]
|-/-|----- | Dearborn, MI 48126|
|/  |LLIE  | (313) 582-1540    |


Attachment: msg24832/pgp00000.pgp
Description: PGP signature

Reply via email to