Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA27442; Wed, 22 Jul 92 15:12:20 -0700
Message-Id: <9207222212.AA27442@postgres.Berkeley.EDU>
From: mcquaig!nmm@uunet.UU.NET ("Neil M. McQuaig, III")
Subject: Re: Problem in Installing Postgres-v4.0
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
In-Reply-To: Your message of "Tue, 21 Jul 92 19:04:52 CDT."
             <9207220204.AA16700@postgres.Berkeley.EDU> 
Date: Tue, 21 Jul 92 22:42:50 CDT
From: mcquaig!nmm@uunet.UU.NET ("Neil M. McQuaig, III")

>Yesterday, I got postgres-v4r0.tar.Z from Kyoto University 
>and tried to install it on a SPARCstation IPX. However, 
>"~postgres/newconf/Make install" fails.
>
>Error messages are generated while compiling "inh.c".
>They indicate that ~postgres/src/lib/H/nodes/*.gen 
>have errors. 
>
>The errors in *.gen files seem to be in lines defining 
>variables of specific types, such as FuncIndexInfoPtr, 
>IndexInfoPtr, ExprContext, TupleTableSlot, ScanDirection, 
>HeapTuple, RelationInfo, TupleCount, etc.
>
>Did anyone find bugs in the program that generates *.gen 
>(~postgres/src/lib/Gen/*.sh) ?
>
>I appreciate any kind of advice. Sorry if I am too easy to ask.
>--
>Shin'ichi KONOMI 
>  Computer Center, Kyushu University, Fukuoka, JAPAN)
>PHONE: 81-92-641-1101 (ext.2524) FAX: 81-92-631-3196

I have had such errors generated because of laxness in typing.
String, bool *, BoolPtr, char *, etc. are used interchangably it
seems.  Unfortunately, many compilers interested in typing and/or
in being "Ansi" enforce such things as 'anything that gets promoted
to an integer in an function call must match an integer in the
prototype' and other such non-research trivialities ;-}
There seems also to be some underlying assumptions and/or beliefs
that various of these types are the same size.  Unfortunately this is not 
the case on all platforms.   ScanDirection is one such variable.  I am
currently experimenting with such things as defining uint16 to an unsigned
int in c.h instead of an unsigned short.  This quieted my compiler but I
have no experience yet as to was it did to the engine.

Although I'm not sure if it still exists (it did in 3.0) but another gotcha
of the Ansi fad is the typing of Pointer in c.h.  By default it is set to
a void *.  This causes some compilers to complain that you can't do 
pointer arithmetic on a pointer of unknown size (definition of void *) since
a pointer is supposed to increment by the size of the object to which it
points.  Evidently Beserkeley compilers default to a size of 1.   Defining
Pointer as a char * might solve some strangenesses.  It appears that it
is consistently treated as such.   Good luck, its worth the effort to
get it running.   Jeff et.al. do good work and seem to care about what 
they do.  Thanks fellas.

Neil M. McQuaig, III
344 Millicent Way
Shreveport, LA  71106
Voice: (318) 868-5611
Email: uunet!mcquaig!nmm or nmm@netcom.com
