Re: Second call for platform testing

Lists: pgsql-hackers
From: "Zeugswetter Andreas SB SD" <ZeugswetterA(at)spardat(dot)at>
To: "Cyril VELTER" <cyril(dot)velter(at)libertysurf(dot)fr>, "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Second call for platform testing
Date: 2001-11-29 16:27:50
Message-ID: 46C15C39FEB2C44BA555E356FBCD6FA41EB444@m0114.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers


> What modification should be made to configure.in to make it
include
> SupportDefs.h when testing for int8 uint8 int64 and uint64 size ?

Is SupportDefs.h actually (probably implicitly) included by the
PostgreSQL
source ? Because if it is not, PostgreSQL is quite happy not finding
them in
configure.

Not finding them is only a problem if you get redefines during
compilation
(and if your compiler then treats that as fatal).

Andreas


From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Zeugswetter Andreas SB SD <ZeugswetterA(at)spardat(dot)at>
Cc: Cyril VELTER <cyril(dot)velter(at)libertysurf(dot)fr>, PostgreSQL Hackers Mailing List <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Second call for platform testing
Date: 2001-11-29 16:51:38
Message-ID: 200111291651.fATGpca04858@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>
> > What modification should be made to configure.in to make it
> include
> > SupportDefs.h when testing for int8 uint8 int64 and uint64 size ?
>
> Is SupportDefs.h actually (probably implicitly) included by the
> PostgreSQL
> source ? Because if it is not, PostgreSQL is quite happy not finding
> them in
> configure.
>
> Not finding them is only a problem if you get redefines during
> compilation
> (and if your compiler then treats that as fatal).

Good point. Also, a mixed-case include file is quite unusual. One idea
if you can't get it working is to either include "SupportDefs.h" for
BeOS in configure.in and c.h, or check the top of SupportDefs.h. Often
there is an #ifdef at the top to prevent the file from being included
twice. If you define that in c.h for BeOS, the include SupportDefs.h
will never be used and we can use our own defines for uint8/uint64.

FYI, this test was added for AIX in recent weeks because it had similar
trouble.

Here is the little snippet of code from configure to test for uint8:

#include "confdefs.h"
#include <stdio.h>
main()
{
FILE *f=fopen("conftestval", "w");
if (!f) exit(1);
fprintf(f, "%d\n", sizeof(uint8));
exit(0);
}

Now, we would normally modify configure.in, but you can play with
configure until you get it to work, let us know, and we can modify
configure.in, run autoconf, make any needed additions to c.h, and get it
into CVS.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026


From: "Cyril VELTER" <cyril(dot)velter(at)libertysurf(dot)fr>
To: "PostgreSQL Hackers Mailing List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Second call for platform testing
Date: 2001-11-29 18:40:45
Message-ID: 01a501c17905$5e6a32a0$6901a8c0@dev1
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

>> What modification should be made to configure.in to make it include
>> SupportDefs.h when testing for int8 uint8 int64 and uint64 size ?

>Is SupportDefs.h actually (probably implicitly) included by the
>PostgreSQL
>source ? Because if it is not, PostgreSQL is quite happy not finding
>them in
>configure.

>Not finding them is only a problem if you get redefines during
>compilation
>(and if your compiler then treats that as fatal).

SupportDefs.h is conditionaly included in c.h so everything is Ok when I
compile the backend, but when configure try to figure out the size of int8
... they are not defined.

May be SupportDefs.h should be included from another file ?

cyril