X-Original-To: pgsql-interfaces@postgresql.org Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 63F53474E4F; Wed, 26 Feb 2003 10:33:53 -0500 (EST) Received: from postgresql.org ([64.49.215.8]) by localhost (postgresql.org [64.49.215.8:10024]) (amavisd-new) with SMTP id 76194-03; Wed, 26 Feb 2003 10:33:42 -0500 (EST) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.187]) by postgresql.org (Postfix) with ESMTP id A3A77474E42; Wed, 26 Feb 2003 10:33:42 -0500 (EST) Received: from [212.227.126.161] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 18o3Z5-0001nu-00; Wed, 26 Feb 2003 16:33:47 +0100 Received: from [80.142.162.79] (helo=fam-meskes.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 18o3Z4-0007qe-00; Wed, 26 Feb 2003 16:33:47 +0100 Received: by fam-meskes.de (Postfix, from userid 1000) id 1C2C610EF50; Wed, 26 Feb 2003 16:33:43 +0100 (CET) Date: Wed, 26 Feb 2003 16:33:43 +0100 From: Michael Meskes To: Matthew Vanecek Cc: Michael Meskes , Postgresql Interfaces List Subject: Re: ECPG and C++ compilation Message-ID: <20030226153343.GA26887@feivel.fam-meskes.de> Mail-Followup-To: Matthew Vanecek , Michael Meskes , Postgresql Interfaces List References: <1045926883.27169.76.camel@reliant.home.pri> <20030224152458.GA2980@feivel.fam-meskes.de> <1046205884.12260.77.camel@reliant.home.pri> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1046205884.12260.77.camel@reliant.home.pri> User-Agent: Mutt/1.4i X-Virus-Scanned: by amavisd-new X-Archive-Number: 200302/112 X-Sequence-Number: 3733 On Tue, Feb 25, 2003 at 02:44:45PM -0600, Matthew Vanecek wrote: > EXEC SQL BEGIN DECLARE SECTION; > struct s_somestruct { > int id; > char *field; > }; >=20 > typedef struct s_somestruct SomeStruct; > EXEC SQL END DECLARE SECTION; Ah, now I understand. Yes, this is a long standing bug. Or make that a missing feature. The struct definition has to be listed inside the typedef.= =20 > Doing "typedef struct { /* stuff */ } AStruct;" appears to work with > ecpg from 7.3.2, but IIRC, it would not work in 7.2.3. I'm note sure what worked in 7.2.3. :-) > Is sizeof() a compile-time execution/calculation? If so, then it would AFAIK yes. > definitely not be portable, unless you implemented/used a generic types > library (such as glib, for example). Since it works in C, though, and > ECPG generates C, I'm by no means making a suggestion to follow this > path. ;) Michael --=20 Michael Meskes Email: Michael@Fam-Meskes.De ICQ: 179140304 Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!