X-Original-To: pgsql-interfaces-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id A90F7D1B502 for ; Wed, 1 Oct 2003 22:55:46 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 41266-04 for ; Wed, 1 Oct 2003 19:54:59 -0300 (ADT) Received: from smtp014.mail.yahoo.com (smtp014.mail.yahoo.com [216.136.173.58]) by svr1.postgresql.org (Postfix) with SMTP id 3833BD1B58F for ; Wed, 1 Oct 2003 19:53:41 -0300 (ADT) Received: from xdsl-213-168-123-81.netcologne.de (HELO yahoo.de) (carstenklein@213.168.123.81 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 1 Oct 2003 22:53:42 -0000 Message-ID: <3F7B5BE1.3000309@yahoo.de> Date: Thu, 02 Oct 2003 00:57:37 +0200 From: Carsten Klein Reply-To: carstenklein@yahoo.de User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.5) Gecko/20030917 X-Accept-Language: en-us, en MIME-Version: 1.0 To: pgsql-interfaces@postgresql.org Subject: Embedded SQL: Putting a guard around included stdio.h for convenience Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=USER_AGENT_MOZILLA_UA X-Spam-Level: X-Archive-Number: 200310/15 X-Sequence-Number: 4504 Hi all, I have just tried to compile an application consisting of multiple modules, each of them encapsulation access to a single table of the default database, using embedded sql. Well, until now, I have had problems with stuff being declared twice (from stdio.h and successively included include files by stdio.h), since postgres sources seemingly do not put a guard around the include statement. what i mean is, please, do include the following: #ifndef _STDIO_H #include #endif /* _STDIO_H */ This seemingly is not being generated by the ecpg or included in the header files being included. And while we are at it, although I personally think that Embedded SQL is quite obsolete by now (but we have to do this stuff in school, perhaps I'm wrong), please check other parts of your source referencing (including) external include files, where there is no guard around the include statement. It makes things tedious and nearly impossible to solve, when they are not there... Thanks. Carsten Klein